Re: Apparent documentation contradiction for XmlNode.SelectSingleNode(
- From: Martin Honnen <mahotrash@xxxxxxxx>
- Date: Sat, 26 Aug 2006 17:51:33 +0200
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/
.
- Prev by Date: Re: Help with XslCompiledTransform
- Next by Date: RE: Error using ReadXmlSchema on a xsd file.
- Previous by thread: FREE .NET EBOOKS , DOTNET TUTORIALS, CODE SNIPPETS - www.DotNetGuide.net
- Next by thread: Update XML config file with treeview nodes
- Index(es):
Relevant Pages
|
Loading