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 ...
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.
thanks.
yes :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
pretty nice example.. thank you.. i guess the xmldoc gets passed by value..
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