Hosted by
|
with Token_Readers; use Token_Readers;
package body Score_Instruments.MusicXML is
function Read_Score_Instrument
(XML : access XML_Reader)
return Score_Instrument_Access is
begin
Assert_Attribute_Name(XML, "id");
Read_Attribute_Value(XML);
Exit_Tag(XML);
return Create(Get_Token(XML), Read_Element_Data(XML, "instrument-name"));
end Read_Score_Instrument;
procedure Write_Score_Instrument
(XML : access XML_Writer;
This : access Score_Instrument)
is
begin
Start_Element(XML, "score-instrument", "id", Get_ID(This));
Write_Element(XML, "instrument-name", Get_Name(This));
Close_Element(XML, "score-instrument");
end Write_Score_Instrument;
end Score_Instruments.MusicXML;
|