xmlTree - minimalistic XML processor for PHP
Friday, March 30, 2007
xmlTree is a tiny, little XML processor for PHP that doesn't even offer 10% of what the XML spec has to offer, but still manages to do almost everything a normal developer needs (and besides, it's easy to extend). It's meant for all those people that
Essentially, it provides the following features:
- Hate to use code that they cannot possibly understand
- Prefer small libraries
- Don't expect the XML Library to validate their data
- Don't need the XML library to handle data that's not trustworthy
- Don't need automatic character conversion, like " to \" or <>
Essentially, it provides the following features:
- An XMLElement class that provides parentNode, childNodes, tagName and attributes. It also provides a value for text nodes
- A Javascript like DOM manipulation system, featuring such gems as appendChild, setAttribute, getAttribute, removeChild, getElementsByTagName, getElementsByName,getElementById, toXML and toFile, all of which (with the exception of the last two methods) behave almost exactly like their Javascript counterparts.
- An XMLDocument class with html, head, title and body (nothing special, but it makes life easier)
- An XMLParser class that turns an XML string into a XMLElement tree.
