Getting XML data into ASP page


Getting xml data into an asp page is easy. The steps involved in this process are first to create an xml document object and load the xml file that has data into it.

Once you have loaded the xml document in to the document object, then you can navigate through the nodes and the content of the nodes are assigned to the variables you have declared. These variables are used in the body of the asp page to be displayed wherever you want.

We use the Server.CreateObject("Microsoft.XMLDOM") command to create and xml object into which we will be loading the xml file. Use the Load method of the XMLDOM to load the xml file.

Since the load method takes only the exact physical path to the file, we need to use the Server.MapPath method to get the exact path of the xml file. Now use the xmlobject's documentElement.childNodes(n).text to get the text in the 'n'th node. You can use the xml object's async property to False to display the content of the xml file as soon as it is read. This speeds up the display.




.

SetApp - 100 Apps for everything you ever wanted to do on Mac

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________








 

 

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!

Visit XML Training Material Guide Homepage

 

 

“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”

Copyright - © 2004 - 2019 - All Rights Reserved.