SimpleXML
This Screencast will be available soon.
Working with XML data in PHP has not always been the easiest thing to do. PHP 4’s native support for reading and manipulating XML was bloated and cumbersome. PHP 5 ships with the incredibly powerful DOM classes, however those can be quite cumbersome at times; especially when doing simple XML parsing.
SimpleXML, as its name would suggest, is a simple way to access XML data. Like DOM, it was one of the many wonderful new tools made available in PHP 5. Unlike DOM, very little effort is required when reading from XML files. If you are running PHP 5.1+, you also have the ability to manipulate XML by adding nodes and attributes. As if that were not enough, SimpleXML was implemented in such a way that it can read from and manipulate XML data provided by DOM.
Screencast Outline
- Functional Overview
- Loading XML Data
- Reading Node and Attribute Data
- Childnode Iteration
- Manipulating Data
- XPath
- String Comparison
- DOM Interoperability
- Advanced SimpleXML