[Home] [By Thread] [By Date] [Recent Entries]

  • To: "Xml-Dev" <xml-dev@l...>
  • Subject: Root Document Node
  • From: "Karl Stubsjoen" <karl@e...>
  • Date: Tue, 13 Aug 2002 07:26:39 -0700
  • Importance: Normal

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

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member