Closed synchronisator closed 1 year ago
The parser for score-parts is always 1 because the filter is not working like it should.
lib/src/music_xml_document.dart:36
score .findAllElements('part-list') .where((element) => element.getElement('score-part') != null) .map((element) => element.getElement('score-part')!) .map((element) => ScorePart.parse(element)) .forEach((element) => scoreParts[element.id] = element);
The tag 'part-list' only appears one-time in the xml and contains a list of score-part. I changed the Code to this: and it worked:
score .findAllElements('part-list').first .findAllElements('score-part') .map(ScorePart.parse) .forEach((ScorePart element) => scoreParts[element.id] = element);
Because the part-list is marked as "required" in the decumentation the call of "first" should be save. But it could lead to an exception with a bad xml file.
fixed at #9
The parser for score-parts is always 1 because the filter is not working like it should.
lib/src/music_xml_document.dart:36
The tag 'part-list' only appears one-time in the xml and contains a list of score-part. I changed the Code to this: and it worked:
Because the part-list is marked as "required" in the decumentation the call of "first" should be save. But it could lead to an exception with a bad xml file.