Reading XML data in ASP pageThere 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.
|
|
|||
|
||||
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”
Copyright - © 2004 - 2019 - All Rights Reserved.