Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
Updated readmei to work with most recent code
Browse files Browse the repository at this point in the history
  • Loading branch information
ifkarp committed May 12, 2015
1 parent d6c8ee9 commit 3fcbd75
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions util/readmei.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,24 @@ using std::endl;
using std::cerr;
using std::string;

using namespace mei;
using mei::XMLImportResult;
using mei::documentToFile;
using mei::documentFromFile;
using mei::MeiDocument;
using mei::MeiElement;
using mei::MeiAttribute;
using mei::MEI_STRICT_IMPORT;
using mei::Note;

int main(int argc, char **argv) {
if (argc < 3) {
cerr << "usage: " << argv[0] << " input output" << endl;
cerr << " Use this program on beethoven.mei" << endl;
return 1;
}

MeiDocument* doc = XmlImport::documentFromFile(string(argv[1]));

XMLImportResult res = documentFromFile(string(argv[1]), MEI_STRICT_IMPORT);
MeiDocument* doc = res.getMeiDocument();

// Find an element
MeiElement *note1 = doc->getElementById("d1e111");
Expand Down Expand Up @@ -61,7 +69,7 @@ int main(int argc, char **argv) {
}

// Save out again
XmlExport::meiDocumentToFile(doc, string(argv[2]));
documentToFile(doc, string(argv[2]));

return 0;
}

0 comments on commit 3fcbd75

Please sign in to comment.