OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Root Document Node

[ Lists Home | Date Index | Thread Index ]
  • To: "Karl Stubsjoen" <karl@excelbus.com>,"Xml-Dev" <xml-dev@lists.xml.org>
  • Subject: RE: [xml-dev] Root Document Node
  • From: "Dare Obasanjo" <dareo@microsoft.com>
  • Date: Tue, 13 Aug 2002 07:45:35 -0700
  • Thread-index: AcJC1WF8UIyYNzuORBqsescA1gHdrwAAhwUw
  • Thread-topic: [xml-dev] Root Document Node

Title: Message
<pedantic>
The root node is not the same as the document element. More info at http://www.w3.org/TR/xpath#root-node
</pedantic>

--
PITHY WORDS OF WISDOM
The buddy system is essential to your survival; it gives the enemy somebody else to shoot at.   

This posting is provided "AS IS" with no warranties, and confers no rights.

-----Original Message-----
From: Karl Stubsjoen [mailto:karl@excelbus.com]
Sent: Tuesday, August 13, 2002 7:27 AM
To: Xml-Dev
Subject: [xml-dev] Root Document Node

Hello,
I'm interested in finding the root document node without knowing the name of that node.  However, not sure how to iterate throught the XML doc to determine when I've actually found this root element.  I tried setting root (a declared element) to childnodes(0), but that returned the xml processing intstruction.  Setting root to childnodes(1) worked (but tested on a very simple xml document), but what if there are more processing intrustions, or a DTD contained within this XML document.
 
Thanks for the help!
 
PS - the end result is this:  within this root element the user will be required to supply a UID and PWD, but the XML document might originate from many different sources, however I will always be able to count on the UID and PWD nodes within the root document.
 
Karl




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS