I have added support for node attributes to the PHP Simple Large XML Parser class.
Now it’s possible to retrieve the structure of the XML document with the attributes of the nodes. If you choose to get the nodes also the structure of the result array will be different from the non-attribute array.
The new structure will be like this:
<?php
array('value'=> 'another node / value' ,
'attributes'=>array('attribute name'=>'attribute value',
'another attribute'=>'some value',
'yet another attribute'=>'other value'
)
);
?>
In order to get the array with attributes you need to pass the 3rd parameter as true:
<?php SimpleLargeXMLParser::parseXML($xml, "//myFirstNode", true); ?>
You can download the new version from here.
Please read this post for more information about the functionality of the class: