How to read an XML file in ASPReading an XML file in ASP is very simple if you are using the xmldom object. Create an xmldom object first and then load the xml file that you want to read in this xmlobject. For loading the xml file in the xmldom object you have to use the Load method available in it. The load method takes the physical path of the xml file. It is not easy to guess the physical path of the xml file and hence you can use the Server.MapPath method to get it. Before loading the xml file set the async property of the xml object to False. This ensures that the xml file is loaded fast as it is read.Once you have loaded the xml file to the xml object. You can navigate through the xml object using the documentElement.childNodes(n).text and get the value available in the nth node of the xml file. Assign these values to some variable and then display the variable in any part of the asp page.
|
|
|||
|
||||
“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”
Copyright - © 2004 - 2019 - All Rights Reserved.