I’m currently trying to learn about XML structures.
Taking an example from the JUCE demo code:
<DEMO_TABLE_DATA>
<COLUMNS>
<COLUMN columnId="2" name="Artist" width="150"/>
</COLUMNS>
</DEMO_TABLE_DATA>
would this be the correct code to produce this (when converted back into a text document):
XmlElement DEMO_TABLE_DATA; // outter node
XmlElement* columns = new XmlElement("COLUMNS");
DEMO_TABLE_DATA.addChildElement(columns);
XmlElement* column = new XmlElement("COLUMN");
column->setAttribute("columnId", 2);
column->setAttribute("name", "Artist");
column->setAttribute("width", 150);
columns->addChildElement(column);
edit:
fixed variable names crept in from my actual code