[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XPath Question

Subject: XPath Question
From: "Emmanuel Oviosa" <Emmanuel.Oviosa@xxxxxxxxx>
Date: Fri, 12 Jul 2002 10:31:18 +0100
nodetypedvalue
This question might not be appriopiate here but please do forgive me.

I am interested in getting the ID attribute that is present in each Region
Node, I know that I can do 
RegionID =
objXMLDoc.selectSingleNode("/CRegions/Regions/Region[2]/@ID").nodeTypedValue
to get the attribute for the second region none but I want to iterate
through the Region nodes and get the ID attributes text. 

set regionsNodeList = objXMLDoc.selectNodes("/CRegions/Regions/Region")
intRegions = regionsNodeList.length 
for intCount = 1 to intRegions 
	
	' there are multiple Region nodes so get me the next node 
	set RegionNode = regionsNodeList.nextNode() 
	RegionID =
objXMLDoc.selectSingleNode("/CRegions/Regions/Region/@ID").nodeTypedValue 
	
	' get the RegionNode value
	RegionNode.nodeTypedValue 

	' get the ID attribute
next 

XML string: "<CRegions><Regions><Region ID='1'>Bristol</Region><Region
ID='2'>London</Region></Regions></CRegions>" 

Thanks guys






The contents of this email and any attachments may be privileged or confidential, for the exclusive use of the intended recipient(s) only and may not be disclosed or used in any way other than by the addressee(s). If you have  received this email in error please advise the sender and delete from your system.

Integrated Solutions Consultants Ltd are unable to guarantee the security of email content outside of our own systems where all emails and content are treated in accordance with the Regulation of Investigatory Powers Act 2000.

Further information about Integrated Solutions Consultants Ltd is available at http://www.isc.co.uk or mailto:info@xxxxxxxxx

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • XPath Question
    • Emmanuel Oviosa - Fri, 12 Jul 2002 05:30:36 -0400 (EDT) <=
      • <Possible follow-ups>
      • Emmanuel Oviosa - Fri, 12 Jul 2002 08:55:14 -0400 (EDT)

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.