Creation of XML

G

Guest

Hi,

I would like to insert a child xml element under its parent node in a
XmlDocument. I can't figure out how to do this. Is XmlWriter the only option
here.

brgds Jesper.
 
H

Hans Kesting

Jesper said:
Hi,

I would like to insert a child xml element under its parent node in a
XmlDocument. I can't figure out how to do this. Is XmlWriter the only option
here.

brgds Jesper.

On the XmlDocument there is a CreateNode method. Use this to create an
XmlNode that you can insert somewhere in the tree. You can use
AppendChild, InsertBefore or InsertAfter on some XmlNode in this
document to add your newly created node.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top