[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPath Question
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|