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
 
Back
Top