PHP 5 DOM and XMLReader: Reading XML with Namespace (Part 1)
PHP-5's DOM and XMLReader provides the ability to read XML files easily. The good thing about PHP-5's DOM (mainly DomDocument, DomNodeList, DomNode) is that it implements the standard DOM features as specified by W3C. W3C's reference on DOM can be viewed here. So, if someone has used DOM before (say on JavaScript), then it would be easy for him/her to grasp PHP-5's DOM.
PHP 5 XMLReader: Reading XML with Namespace (Part 2)
This is a continuation of previous article, where I wrote on how to use PHP'5 DOM to read XML Files easily. But, for large files, its better to use XMLReader. Unlike DomDocument, XMLReader does not load the entire File on memory. It reads an XML file one node at a time. I hardly use XMLReader because it requires writing a lot of codes, but for extremely large XML Files, its better to use it. Full reference on XMLReader can be viewed here. It requires PHP 5.2.
PHP DomXPath: Read Complex XML files easily.
XPath allows traversing through XML elements and attributes very easily. For complex XMLs, using XPath can significantly reduce the complexity of coding.
Good Tutorial of XPath can be viewed on W3C schools here. Reference on DomXPath can be viewed here.
XPath is useful if someone needs to extract a specific node from an entire XML, rather than parsing the entire XML by running a query. Below I will explain how to use DomDocument and DomXPath to read XML. At first I will start with a simple XML, and then more complex.