473,480 Members | 2,592 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Apparent documentation contradiction for XmlNode.SelectSingleNode(

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.

Aug 26 '06 #1
1 1514


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/
Aug 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
65520
by: Pluto | last post by:
What is the difference between XmlNode and XmlElement? I'm trying to implement the code at http://www.devx.com/dotnet/Article/11616/0/page/3 in C# and I'm getting an error at this line:...
4
4930
by: Rune | last post by:
I have two queries that appear to be exactly the same, but one of them returns null while the other one returns a valid result! Can anyone provide an explanation to why this is so? Below is an...
2
10373
by: David Elliott | last post by:
I am creating a configuration class to read / write a standard configuration file. <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="ConnectionString"...
2
1472
by: J Mon | last post by:
I have a XML document with elements like <offer> <field name="name"><!]></field> <field name="merchant_id"><!]></field> ..... </offer> I know not the best XML! Now I am selecting different...
1
4728
by: andrej | last post by:
hi, ich habe eine anwendung, welche ein xml document erstellt. um festzustellen, ob ein element bereits vorhanden ist, verwende ich die funktion selectsinglenode( ....) diese funktion...
1
4729
by: Jesper | last post by:
Hi, I've read somewhere that try/catch shoudn't be used as an alternative to if clauses (maybe it was in C++ regi). However, when using XmlNode.SelectSingleNode(XPath expression) to get a node,...
2
13956
by: Josema | last post by:
Hi, Im trying to get a xmlnode having the value of an attribute, but without success this is my xml file: <promotions> <promotion id="0"> <image>images/gifs/Panel4/Panel4_Prom2.gif</image>...
4
4596
by: SkyHook | last post by:
1. Under the topic "Select Nodes Using XPath Navigation" it says: "All XmlNodeList objects are synchronized with the underlying document, therefore if you ... modify the value of a node, that node...
2
1641
by: NS | last post by:
Hello, I'm new to xml and I have a question: I try to do the following Dim doc As New XmlDocument doc.LoadXml("<Request><Root><Requestor name='' /><FlowData flowstatus=''...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7060
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7022
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.