Wrox Programmer Forums
|
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 25th, 2005, 07:01 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default Reading XML string using asp

I'm working on a shipping charges calculator gateway. The response string send by the gateway is in xml format.

<?xml version="1.0"?><version>2.0.0.0</version><shipmentID>88889</shipmentID><origination><name>Zeeshan Ahmed</name><weight unit="LB">3.0</weight><dimensions unit="IN"><length>1.0</length>


How can I read different nodes of xml string using ASP. Like suppose if I want to read "WEIGHT" from xml string. How can I read it?


Any Idea..
Any Help....

Will be appciated.


Thanks
Zeeshan Ahmed

 
Old January 25th, 2005, 07:34 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

http://www.w3schools.com/dom/dom_access.asp

Om Prakash
 
Old March 10th, 2005, 11:54 PM
Registered User
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
You must be aware of using xml DOM obj, this is the simplest way to read from the XML node

Set objDoc = CreateObject("Microsoft.XMLDOM")
objDoc.async = False
objDoc.load("file.xml") or objDoc.LoadXml(xmlString)


Set Node = objXMLDoc.documentElement.selectSingleNode("Parent Node/NodeTextToRead")

  response.write Node.text
' reading the node value usiging text property
hope this will help you.
All the best.......







Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading XML through ASP jeffm_22 Classic ASP XML 3 June 11th, 2010 07:02 AM
Reading xml string from remote server niravp Classic ASP XML 2 June 10th, 2006 02:37 PM
Reading XML file using ASP itHighway Classic ASP XML 1 June 7th, 2006 06:16 AM
Reading XML file using ASP itHighway XSLT 2 April 29th, 2006 04:52 AM
Reading XML from ASP texasraven Classic ASP XML 2 February 26th, 2004 03:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.