View Single Post
Old 08-09-2012, 12:29 AM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,213
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Actually, if the server side system you are using understands XML well, you can load the XML file into an XML document, *append* the new <Level> with its subnodes, and then write the XML document back out as XML text. Trivial to do in ASP.NET or JSP. Not very hard to do in classic ASP. You then don't have to parse the XML in the file by hand to try and find the closing tag.

(I don't use PHP, so I don't know where this is easy or hard there. If it's not easy--assuming you have the right libraries--I would be surprised.)
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is online now   Reply With Quote