Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Saving only a node in an xml file

From: "Julien Mazloum" <mjulien@---.-->
To: NULL
Date: 9/30/2004 7:09:00 PM
Hi all,

I need to be able to save only one node at a time in an XML file.
I already use DOM in my C++ code to process XML files.
The problem is that the Save() in DOM saves all the the elements of the
file.
Which is not what I want.
I have not found an easy way to do that but I need a generic solution that
is format independent because I need to do that on different file formats.
I am not very familiar with SAX.

The only thing I can find for the moment:
- Have the xml descrition of the element before I do the Save of my
element. ->(string xmlNode1)
- Extract the XML from IXMLDOMElement with the "xml" property of the element
I want to save (string xmlNode2).
- Do a text search and replace of the string xmlNode1 with the string
xmlNode2.

Which is very ugly and goes against XML usage.

I would be very surprised to be the first to have this problem.

Please help.

Thanks,
Julien.




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent