Link to home
Start Free TrialLog in
Avatar of alain123
alain123

asked on

XmlDocument selectSinglenodes?

how do i selectSinglenodes from an XmlDocument  without putting them into a XmlNode object?    in other words, i want to select single nodes into the same xmlDocument object ...

Avatar of esteban_felipe
esteban_felipe

Hi alain123,

I think you are missing something here. It seems to me that you think than the XmlNode is an "orphan" node and not part of the xmldocument.

selectSingleNode will return the first matching node. You keep the reference to that node using an XMLNode instance. But it's a reference. Any changes that you apply to the node will reflect in the XMLDocument instance.

So you are not "putting" it in a XmlNode, you are referencing it using a Xmlnode.

Esteban Felipe
www.estebanf.com
Avatar of alain123

ASKER

Hi Esteban how is it going, so on your answer... " So you are not "putting" it in a XmlNode, you are referencing "it" using a Xmlnode." ==> do you mean it's referencing the xmlDocument?  and if I pass this object as a parameter to another class, would the changes afect the original xmldoc?

thanks.
ASKER CERTIFIED SOLUTION
Avatar of esteban_felipe
esteban_felipe

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
pretty nice example.. thank you.. i guess the xmldoc gets passed by value..