Altova Mailing List Archives


Re: How to append/replace a node in DOM created from an xml string?

From: "Chris Barber" <chris@----------.--.--.------>
To: NULL
Date: 2/24/2004 12:48:00 AM
Look for .createDocumentFragment.

Here's a reference to a previous thread where I posted some VB code to
achieve this (I'm not a C coder) - I'm sure you can take the VB and convert
to C.

http://tinyurl.com/2doot

Chris.


"Noriko" <anonymous@d...> wrote in message
news:8C6078F4-C0A7-481A-9B68-6BDD981512B8@m......
I understand that .NET supports what I'm asking. I'm trying to do this using
C++ with MSXML4.

     ----- Noriko wrote: -----

     I need to either replace an existing node or append a new node of which
information is already in xml format.
     The format of the string is
     <Database Key="1234" Name="DB1" Server="MyServer"> This is the actual
connection string</Database>
     I need to add this node to the existing file if no node has the Key
"1234". If the node of which key attribute is 1234, I need to replace the
entire node with the given xml string.

     What's the best way to do that? I have seen examples of creating a new
node from scratch, but I'd rather not to parse the existing xml string. I
would like to add/replace it as is.

     Thanks,


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.