Depends on what you need. To parse an XML document is to extract and read the information contained in that document. You can do this with server-side code like PHP or ASP. You can also use the XML stylesheet language XSL.
As a webmaster you may never have the need to use XML, but a lot of technology does use it. RSS feeds like the one dmoz uses to do a database dump is XML. It really depends on your goals technically.
i think XML was designed to describe the data and focus on what the data is ....it is widely used to structure, store and send information ...
when information is stored in XML we need to read that document .......... that is done through parsing ... i wanted to know how it is done ... what xml objects are used to do that ..... i mean how is generally parsing done to read the huge documents and display it ../
This is an interesting question. I have often felt the need to parse XML documents, but I don't have a good XML background. Are there any good softwares available which take care to parse the xml documents in our desired format.
when information is stored in XML we need to read that document .......... that is done through parsing ... i wanted to know how it is done ... what xml objects are used to do that ..... i mean how is generally parsing done to read the huge documents and display it ..
Basic idea of parsing is to break the markup into a Document-Object Model (DOM) containing the various parts and their attributes, relationships, &c. This DOM can then be queried to get the various informations.
What is commonly meant when people talk about an 'XML parser' is just an engine that reads in an XML file and tries to build a DOM from it in a format that is accessible from whatever program is calling it, e.g., Xerces.
As mentioned, XSLT / XPath as well as PHP and other scripting languages, are are usually the programs used to query the DOM that was constructed by the parser. Depending on the programmer, the information that was retreived is then displayed in some common format such as XHTML + CSS, or PDF.
Korkus, Great thread there! (The last post btw) I have been actively using xml/xsl/asp for about 2 years now, and have to say I love it totally.
Why it is used
Basically XML can be thought of as a container for data that then can be transferred between two systems.
How to Parse an XML document
I personally work with ht*p://msdn.microsoft.com/library/default.asp?url=/nhp/default.asp?contentid=28000438 (click on msxml -> sdk documentation -> and either msxml 4.0 or 3.0) for all of my parsing and transforming needs. I tend to use XSL to transform my data, instead of parsing with classic ASP.