Erase XmlNode Childs

  • Thread starter Thread starter Sergio Florez M.
  • Start date Start date
S

Sergio Florez M.

I need to erase all the childs in a XmlNode object. I see that it has a
RemoveAll() method but this erases the attributes as well and that's not
what I want. How do I do this?
 
Hi,

Try something like:

while (node.FirstChild!=null)
node.RemoveChild(node.FirstChild);

Hope that helps,


Jonathan Holmes
 

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

Back
Top