Tutorial on Parsing XML data
Parsing xml data from external xml file is easy in asp. You have to work with the xmldom object for that. The first step in working with an xml file in asp, is to create an xmldom object with the statement,
Set xmlobj = Server.CreateObject("Microsoft.XMLDOM")
Now the next step is to load the xml file in this xmlobject using,
Now you can navigate through the xml object using the documentElement.childNodes and get the values available in the xml file. For example if you have booktitles in the first node of the xml file then you can declare a booktitle variable and then get the data from the first node using,
Once you have got this value in the variable it is easy to display it in any place of the web page as you would work with other variables.
There are many tutorials available in the internet on parsing xml data. Another way to parse xml data is to use an xsl style sheet for displaying data from the xml file.
Copyright - © 2004 - 2017 - All Rights Reserved.