XML format
MusicXML 4.0
The interchange format for Western music notation, representing scores part-by-part or timewise for notation and performance software.
MusicXML carries notation rather than only playback events: parts, measures, notes, rests, voices, lyrics, articulations, layout, and engraving hints. score-partwise is the common root, grouping measures beneath each part.
Compressed .mxl files are ZIP containers whose main MusicXML document is named by META-INF/container.xml. A consumer therefore needs container handling as well as XML parsing.
- The version attribute identifies the MusicXML vocabulary version.
- part-list declarations and score-part IDs must match the <part> elements in the score.
- Duration values are interpreted relative to the current divisions value.
- A .mxl document is a package, not a raw XML file, and must be unpacked first.
- Root element
<score-partwise>- Media type
application/vnd.recordare.musicxml+xml- Extensions
.musicxml, .xml, .mxl- Namespaces
- None — unqualified elements
- XMLDir label
xml
Specification: W3C MusicXML 4.0
A minimal valid document
Every example on this site is checked against the same parser the workspace uses, so what you see below is known to be well-formed.
<?xml version="1.0" encoding="UTF-8"?>
<score-partwise version="4.0">
<part-list><score-part id="P1"><part-name>Piano</part-name></score-part></part-list>
<part id="P1"><measure number="1"><attributes><divisions>1</divisions></attributes><note><rest/><duration>4</duration></note></measure></part>
</score-partwise>Get started
Bring order to the XML your team can't afford to ignore.
Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.