01-25-2014 03:00 PM
I want to add to an XML file structured like this.
<model> <column loop="true"> <item2 color="#4d6862" /> <item2 color="#ff0000ff" /> <item2 color="#ff00ff00" /> <item2 color="#ff00ffff" /> <item2 color="#ffff0000" /> <item2 color="#ffff00ff" /> <item2 color="#ffffff00" /> <item2 color="#4d6862" /> </column> </model>
I see adding attributes is tricky as the docs say. How can I add another "item2" item with a color attribute to an existing XML file?
I know I'll use save from:
but they do say
"Note that the save-to-XML support in this version has some serious limitations since the XML output is well-formed (based on the rules of XML markup) but it is not necessarily valid since it does not conform to any schema definition. In particular the choice of whether to output character data as an attribute (name="value") or as an element (<name>value</name>) is not under the developer's control and is based on some simple but arbitrary rules."
Is it possible to do so?
01-27-2014 03:53 AM