Note: I accidentally left out an equal sign after Priority
Well, I did the obvious and tried adding a DUTIES tag and it does go back to the format
<EMPLOYEE Name="Bob SMith">
<DUTIES TaskName="something" Priority="something">
</EMPLOYEE>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<EMPLOYEE Name="Bob SMith" />
and
<EMPLOYEE Name="Bob SMith">
</EMPLOYEE>
...mean exactly the same thing. the '/>' syntax closes a tag. TinyXML always prefers the concise syntax. If you want the more verbose expression, you could modify (or write your own) TiXmlPrinter.
lee
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I have a portion of an XML file as follows:
<EMPLOYEE Name="Bob SMith">
<DUTIES TaskName="answer phones" Priority"1">
<DUTIES TaskName="follow-up pending cases" Priority"2">
<DUTIES TaskName="assist Tom" Priority"3">
</EMPLOYEE>
and I delete DUTIES one at a time, if I delete all within EMPLOYEE then save the file, it gets saved as:
<EMPLOYEE Name="Bob SMith" />
instead of:
<EMPLOYEE>
</EMPLOYEE>
Is that how it should work? Is there a way to save it as
<EMPLOYEE>
</EMPLOYEE> ?? If so, do I need to delete the last child a certain way?
Note: I accidentally left out an equal sign after Priority
Well, I did the obvious and tried adding a DUTIES tag and it does go back to the format
<EMPLOYEE Name="Bob SMith">
<DUTIES TaskName="something" Priority="something">
</EMPLOYEE>
majik--
This:
<EMPLOYEE Name="Bob SMith" />
and
<EMPLOYEE Name="Bob SMith">
</EMPLOYEE>
...mean exactly the same thing. the '/>' syntax closes a tag. TinyXML always prefers the concise syntax. If you want the more verbose expression, you could modify (or write your own) TiXmlPrinter.
lee