Reading XML data in ASP page

There may be situations in your application where you might need to read xml data from an xml file and then display it in the asp page. It is easy to achieve this in an asp page.

For this you have to use the xmldom object to load the xml file. The first task is to create an xmldom object and then use the Load method available in that to load the xml file you need. Use Server.MapPath to get the physical path of the xml file.

Declare some variables to hold the data from the xml file and then navigate through the xml file and get the values in the nodes of the xml file.

For this you can use the documentElement.childNodes. It is better to set the property async of the xmlobject to false so that you can load the xml file faster as it is read. Now use the variables that hold the xml data in the body of the web page just like you display the variables in asp.




.

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.