MusicXML 4.1 Draft
MusicXML 4.1 Draft > MusicXML Reference > Elements > The <barline> element

The <barline> element

Parent elements: <measure> (partwise)<part> (timewise)

barline

If a barline is other than a normal single barline, it should be represented by a barline type that describes it. This includes information about repeats and multiple endings, as well as line style. Barline data is on the same level as the other musical data in a score - a child of a measure in a partwise score, or a part in a timewise score. This allows for barlines within measures, as in dotted barlines that subdivide measures in complex meters. The two fermata elements allow for fermatas on both sides of the barline (the lower one inverted).

Barlines have a location attribute to make it easier to process barlines independently of the other musical data in a score. It is often easier to set up measures separately from entering notes. The location attribute must match where the barline element occurs within the rest of the musical data in the score. If location is left, it should be the first element in the measure, aside from the print, bookmark, and link elements. If location is right, it should be the last element, again with the possible exception of the print, bookmark, and link elements. If no location is specified, the right barline is the default. The segno, coda, and divisions attributes work the same way as in the sound element. They are used for playback when barline elements contain segno or coda child elements.

Content

In this order

Attributes

Name Type Required? Description
coda xs:token No
divisions divisions No
id xs:ID No
location right-left-middle No
segno xs:token No

Examples

This element is used in the following examples:

<barline><beat-repeat><ending><fermata><measure-distance><repeat>