SailBoffin wrote:
I just noticed something confusing the MSDN documentation for the
XmlNode.SelectSingleNode() function here
http://msdn2.microsoft.com/en-us/library/fb63z0tw.aspx
It says, under the "Return Value" section that "The XmlNode should not be
expected to be connected "live" to the XML document." but in the sample code
modifies the node returned from the function and then prints the entire
document. Did I mis-interpret the description of the return value or is the
sample wrong? I've done this before and it's always worked AFAIK.
I am not sure why that comment is in there, as SelectSingleNode is a
method exposed on the .NET DOM implementation with XmlNode, XmlDocument
where you are supposed to be able to edit/manipulate nodes it does not
make much sense to say the node returned by SelectSingleNode is not
"connected live" and "changes that appear in the XML document may not
appear in the XmlNode, and vice versa". In particular as there is no
clear explanation given on how you could then use the SelectSingleNode
result to get a node that is connected live to ensure changes you make
are committed.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/