Posts Tagged ‘namespace’

Simple XML Parser Namespace support

October 27th, 2009

I have added support for namespaces to the parser.
What this means, you are now able to register a namspace in order to be able to parse the XML.

Also the usage of this class changed.


$xml = ""; // parse an Atom feed

// create a new object
$parser = new SimpleLargeXMLParser();
// load the XML

// register the namespace
$parser->registerNamespace("atom", "");
// this will get an array of entries
$array = $parser->parseXML("//atom:feed/atom:entry");


As always, you can download the new version from here.

VN:F [1.9.22_1171]
Rating: 8.5/10 (14 votes cast)