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.

0
8/26/2006 3:06:01 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
640 Views

Similar Articles

[PageSpeed] 28


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/
0
mahotrash (1778)
8/26/2006 3:51:33 PM
Reply:

Similar Artilces:

Combing or merging two publisher documents
Hi Everyone, Is there a way to combine or merge two separate publisher documents? I have the body of my newsletter in one and the first page with title, etc., and the back page with the mailing label in the other. I need to combine them so I can have them printed professionally. Thanks, The only way I know of doing it would be "Insert" a page in the second file and then copy/paste the pages from the first file. Don Publisher 2000 user Vancouver, USA "Dee" <Dee@discussions.microsoft.com> wrote in message news:5484BB1A-112C-41C0-8D7D-3A94246F5CE0@microsoft.c...

Toolbars change for no apparent reason
Excel 2000--in Tools/customize/toolbars I normally select the standard, formatting, drawing, & worksheet menu toolbars, plus a Spreadsheet Assistant (an add-in) toolbar. I customize some of these toolbars with added command buttons from Tools/customize/Commands. Sometimes when I open Excel, I find the Spreadsheet Assistant toolbar floating instead of its normal position where I left it the day before, the Drawing toolbar missing (unchecked in Tools/customize/toolbars), and all my added command buttons have disappeared. Anything to do with windows or office Automatic Updating? What ...

Merging Multiple Documents
I am not sure whether I am going about this the right way so any advice will be greatly appreciated. I have multiple managers reports. Each report is based on a template, ie. Section A, Section B and Section C are consistent throughout. I would like to create one merged document which will group all answers, ie. Section A Manager A's results Manager B's results Manager C's results Section B Manager A's results Manager B's results Manager C's results .... and so forth. Is this possible? Any ideas on how to make this work? Thanks for any help. ...

multiple documents
When I open Excel, multiple documents open all at once Check your "Normal".dot settings Alternatively, through Tools>Options>General, you can set the alternate startup file to be any file you want. Save down a blank workbook and point the startup to this. when Excel opens, it should only load this file "Carole at Jax Bargain" wrote: > When I open Excel, multiple documents open all at once Also, check your "XLSTART" folder. Any files in this folder will automatically open with Excel. In XP, you might find it in: C:\Documents and Settings\yourna...

How to set document printable area?
How to correct the document layout without changing printable area? I have a strictly formatted doc template, it begins from the column B. (column A is empty). I want make that the document layout began from the first column(A). When I remove column A, this causes some layout formatting changes, i.e. changes of a printable area. How to keep layout area without any changes? ...

Apparently no solution
I have posted a few times trying to find out if there is some way to fix the Preview Pane. It sometimes is available, sometimes it is not. Richard <anonymous@discussions.microsoft.com> wrote: > I have posted a few times trying to find out if there is > some way to fix the Preview Pane. It sometimes is > available, sometimes it is not. Does this happen within a single folder, or is it available in some folders but not others? What version of Outlook? -- Brian Tillman It Outlook 2000. The folder doesn't matter. It is an intermittant problem with the Inbox folder i...

document printing problems
Having problems with printing worksheet Have set up to print on a xerox printer with a picture in the header and the data populated by links into the correct cells. prints perfect on the xerox printer. The moment I change to another printer the whole layout changes both in print preview and when printed out despite all paper and page settings being identical. Changes both the picture size and the cell layout. ...

Since Snow Leopard 10.6.2 and/or the 12.2.3 Entourage hangs/stalls for no apparent reason
> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3341496633_9178169 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit The subject says it all. Fans start to spin (Entourage eats a lot of processing power) and I have to force quit it. Any ideas? Sample here: http://home.mac.se/star-affinity/entourage_hang.txt --B_3341496633_9178169 Content-type: text/html; charset="US-ASCII" Content-transfer-encoding: quoted-printable <H...

Apparent Excel 2007 chart HasTitle race condition
The macro below works correctly, i.e. creates a chart without a title, with Excel 2003, but the chart has a title with Excel 2007 SP2 and the Excel 2010 beta. (The macro requires numeric data in the range A1:B10 on the first worksheet.) The macro *does* work correctly with Excel 2007 if I step through it in the debugger (thus introducing delays between each statement), or if I introduce additional statements before the ch.HasTitle statement (in particular *two* DoEvents calls seems to work). My company's application that uses Excel for reports has larger macros contain...

SelectSingleNode with multiple namespaces (sort of)...
Hello all, I've been trying to figure this out for hours now... can anyone help? I have an XML document like this: <?xml version="1.0" encoding="utf-8" ?> <ICE:ServiceCall xmlns="ICE" xmlns:ICE="http://www.ice.net"> <ICE:Service name=""> <ICE:RetVal/> <ICE:ConnString/> <ICE:Params> <Subject>TEST</Subject> </ICE:Params> </ICE:Service> </ICE:ServiceCall> For the life of me, I cannot selectsinglenode() to the Subject. Here's the code: XmlNamespaceManage...

Voiding Historical documents
-- JeannieC ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=3ed2e453-f549-4c6d-8491-5a3c3c774bac&dg=microsoft.public.greatplains ...

Great Plains needs a receiving document
Many customers that use the POP module have requested a document for the receivings transactions. Yes we could use the edit list, but that is not really a good work around. All I ask for is a simple document that has the PO Number, Vendor, Date, and item detail for the receivings transactions. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft We...

Hyperlink opens word template for editting, not as new document
I have created hyperlinks to Word documents and templates in Excel. Clicking the hyperlinks causes the templates to open in Word for editting. I need to have the templates open new documents based on the templates. How can I do this? hi, Neil ! > I have created hyperlinks to Word documents and templates in Excel. > Clicking the hyperlinks causes the templates to open in Word for editting. > I need to have the templates open new documents based on the templates. > How can I do this? create shortcuts (.lnk) to the template document and hyperlink to that shortcut s...

Unsaved document
Is there any way to recover a document that was closed without saving? It seems like I have done this before and now I can not retriev it. Nope. "msawr5250" <msawr5250@discussions.microsoft.com> wrote in message news:27E38D72-9334-4A9B-8B91-8742269F710C@microsoft.com... : : Is there any way to recover a document that was closed without saving? It : seems like I have done this before and now I can not retriev it. If it was not saved, there is nothing to retrieve. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http:/...

m_hDC apparently == NULL
Could I get some help with a dc error? Here's my code, and thanks. Debugger: CDC::PlayMetaFile(HENHMETAFILE__ * 0x184606da, const tagRECT * 0x0012fb80 {top=261 bottom=311 left=241 right=291}) line 999 + 13 bytes _AFXWIN_INLINE BOOL CDC::PlayMetaFile(HENHMETAFILE hEnhMF, LPCRECT lpBounds) { ASSERT(m_hDC != NULL); return ::PlayEnhMetaFile(m_hDC, hEnhMF, lpBound In my sprite class: void CSprite::PlayEmf(CDC* pDC, CRect &rect, CString filename) { HENHMETAFILE hEmf; hEmf = GetEnhMetaFile(EmfFilePath + filename + EmfFileExt); pDC->PlayMetaFile(hEmf, &rect); DeleteEnhMetaFil...

Can I "Track Changes" while editing documents in MS Publisher?
As with Word, is it possible to "Track Changes" while editing documents in MS Publisher? If yes, how? Thanks for any help. No... This is why Word is your best solution. Publisher is a DTP application. -- Mary Sauer http://msauer.mvps.org/ "jinkies shaggy" <jinkies shaggy@discussions.microsoft.com> wrote in message news:0EA3A745-A727-4AC7-B711-C65606DCD2DE@microsoft.com... > As with Word, is it possible to "Track Changes" while editing documents in MS > Publisher? If yes, how? Thanks for any help. ...

Same old story apparently...
I need a Publisher 95 file converted to 98... Can anyone help? Thanks :) I have Publisher 2000 which can save as a Publisher 98 file. I'll give it a try. My real email address is; dschmidtATpacifierDOTcom < change the obvious -- Don Vancouver, USA "StaticVoyager" <StaticVoyager@discussions.microsoft.com> wrote in message news:FED99CB5-E856-4ACA-9D61-0CDC5D6E94FE@microsoft.com... > I need a Publisher 95 file converted to 98... Can anyone help? Thanks :) If Don can't help, I have older versions of Publisher... Remove "my" to reply. -- Mar...

remove underline from 2007 document
I am trying to Remove underlining on a word document. I figured out how to un bold. Please help Ctrl+A to Select All. Then Ctrl+U twice to remove underlining. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Milew" <Milew@discussions.microsoft.com> wrote in message news:5F44D759-1E77-4350-818D-613A049E4BED@microsoft.com... >I am trying to Remove underlining on a word document. I figured out how to >un > bold. Please help > your suppose to click underline then click undue clear button....

Can I undo something saved to restore a document?
In excel, I typed info that went from A to Y. I moved the cells from V over to D so I could type the info in A and B on the end of the doc. I needed to see A and B, then everything between D and V was hidden. After I finished, I forgot to move the cells back, and I saved the doc. Can I recover or undo more than it's allowing me? On 18 May, 19:24, dreamc7215 <dreamc7...@discussions.microsoft.com> wrote: > In excel, I typed info that went from A to Y. I moved the cells from V over > to D so I could type the info in A and B on the end of the doc. I needed to > see A and B...

Problem with document()
Hi, I have inconsistent behavior of document() function which I hope someone can explain. I have Windows Service (runs as LocalSystem) that perform some Xslt transformation. In the stylesheet I load another Xml document using document("http://localhost/myfile.xml") syntax. I use XmlUriResolver object with credentials set to DefaultCredentials and pass it to the Transform method. Everything works fine on my workstation (WinXP x64, Framework 1.1, IIS 6). Now, I have a production server which is Win 2000, IIS5. The same service works here using domain account with all nessesa...

can't email publisher document
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Hi, I created a brochure using the New Blank Publishing Layout Document. Now that I've put a days work into it, I can't mail the bloody thing! I've tried saving it in every conceivable format, tried zipping them, turning on and off compatability (as sometimes it says 25 compatibility issues, and sometimes 46!). I am really at my wits end... please help!!!! I hope you have a few wits left to work this. You don't actually say what the symptoms of the problem are. you talk about "saving it&...

Customizing MailMerge Document Creation
I've been experimenting with creating quotes using the WordMailMerge add-on, as well as using the in-built mail merge functionality with CRM 3.0, and one issue has me perplexed- When I edit the template for the Mail Merge, I can't seem to customize certain fields that only populate once the merge is completed (e.g. outgoing address text box). Additionally, where in the template is it built-in to create a separate line for each product on the quote and pull the records from CRM for each of those quotes? When I write a template from scratch to resolve the first issue, I can't figure...

IMF apparently not working
After installing the two latest Windows Updates for server 2003 and .net framework sp1 on our exchange server, the IMF appears to have stopped working. Users are reporting a large volume of spam in their inboxes. Tried re-installing the IFM. Is it broke? Or did spammers just get really clever over the weekend? Hi Matt, If you examine the IMF performance counters, are they incrementing? Also, if you have the IMF configured to archive at the gateway, do you see any messages in the archive folder? -- Scott Schnoll This posting is provided "AS IS" with no warranties, and confe...

eConnect Documentation #2
Hi, I am tasked to use eConnect to import couple of hundred thousand items from various vendors into item master. I need to use eConnect to do this. I have installed eConnect, but do not know where to start. I am looking for VB.Net code for importing this information and serializing. Please Help! Nupur ...

tranfer publisher document to a pdf file
I have a publisher document and I need to tranfer it to a pdf file but when I try to save as pdf, I get the following errror. (Adobe reader could not open file because it is either not a supported file type or because the file has been damaged)(for example, it was sent as an email attachment and wasn't correctly decoded) gloria wrote: > I have a publisher document and I need to tranfer it to a pdf file > but when I try to save as pdf, I get the following errror. (Adobe > reader could not open file because it is either not a supported file > type or because the file has...