PHP has
functions that can be used to parse XML documents easily. The DOM functions
available in PHP can be used for that purpose. If you have worked with
the DOM functions earlier in ASP, ASP.net or JavaScript, then it is
going to the same concept in PHP also. Even if you don't know that it
is easy to learn how to parse XML documents using PHP.
_______________________________________________
The
first step is to create a document object in PHP. This can be done using
'new DomDocument();'. This would create a document object that can be
used to load the XML document you need to work with.
A load
function is available to load the XML file that you want to work with.
Once you have loaded the XML file, you can use functions like getElementsByTagName
or use XPath to navigate through the nodes and output the result. A
good knowledge of XPath is certain to help you to work with the XML
files.