Hosted by
|
package body Works.MusicXML is
function Read_Work
(XML : access XML_Reader)
return Work_Access
is
Work_Number : String := Read_Element_Data(XML, "work-number");
Work_Title : String := Read_Element_Data(XML, "work-title");
begin
return Create(Work_Number, Work_Title);
end Read_Work;
procedure Write_Work
(XML : access XML_Writer;
This : access Work)
is
begin
Start_Element(XML, "work");
if Get_Number(This) /= "" then
Write_Element(XML, "work-number", Get_Number(This));
end if;
if Get_Title(This) /= "" then
Write_Element(XML, "work-title", Get_Title(This));
end if;
Close_Element(XML, "work");
end Write_Work;
end Works.MusicXML;
|