How to read an XML file in ASP

Reading 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.

In Brief (D-Lib Magazine)
In 2006, the School of Information and Library Science at the University of North Carolina at Chapel Hill (UNC-CH SILS) and the Department of Computer Science at Virginia Tech (VT CS) took the first steps toward developing an interdisciplinary curriculum for digital library (DL) education.

Related Articles (New Mobile Computing)
Apress' open source series of books recently unveiled Mark Mamone's " Practical Mono ", a book targetting new .NET developers. We take a quick look at the book below.



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.

_______________________________________

Recommended XML Books

cover
cover
cover
cover
cover
cover








 

 

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!


New XML Books Titles - Best Seller's @ Amazon.com

Visit XML Training Material Guide Homepage

Technology helps engage students - how do classroom instruction and social dynamics change when the classroom is completely dependant on modern technology?

Dallas Web Design- local Dallas web design firm offers site design and backend system development