%% Write Structure to XML File
% Create a structure from a text file that contains an XML structure, then write it to an XML file.
% The file music.txt has the following structure.
%
% Read the text file music.txt as a structure S. Specify 'FileType' as 'xml' to read the contents of the input as an XML file.

S = readstruct("music.txt","FileType","xml")

% Write S to the XML file named band.xml. Display the contents of band.xml.

writestruct(S,"band.xml")
type band.xml

% Copyright 2020 The MathWorks, Inc.