Loosing Information of Parent in XmlNode

  • Thread starter Thread starter Saurabh Sharma
  • Start date Start date
S

Saurabh Sharma

Hi

When i select a node by "node.Selectnodes("*/ABC")"
the nodes dont have ne details abt the parent.
Can some one plz tell me why its is not storing the parent details.
after selecting i need to delete the nodes so i need the parent details

Regards
Saurabh
 
The nodes don't contain parent information.

SelectNodes passes you back a collection of references to nodes found in
"node".

If you delete them from this array, you are deleting them from the parent as
well, so there's no need to access the parent.

Hope that helps.

Daniel
 
Hi

I'm not familiar with XmlNode class.
Are you sure that "RemoveAll()" will not do whole work?

Regards
Marcin
 
Hi
Well now its getting parent info (i dont know how ) but earlier it wasnt
giving .
Removeall() will delete all the child of that particular node but not that
node.
I need parent info coz if that is the only node in the parent i need to
remove the parent also.
Thanx for the contribution its working now
Regards
Saurabh
 

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