Tuesday, July 8, 2003 05:05 AM
What is the internal representation of the XML file in your program? When you say that you add a node to the existing xml file, do you add it to the internal representation in the correct place.
Most parsers DOM, XDOM, JDOM have some class that will write the internal XML representation to an I/O stream. If you want to serialize the internal XML representation, to include the new node, you just overwrite the existing file with the new representation.