I’m a beginner and I really need your help!
I have an XML file to parse in PHP with a list of empty elements :
<?xml version="1.0" encoding="utf-16"?>
<elements attribute="value" attribute="value">
<element attribute="value" attribute="value" attribute="value" />
<element attribute="value" attribute="value" attribute="value" />
<element attribute="value" attribute="value" attribute="value" />
<element attribute="value" attribute="value" attribute="value" />
...
</elements>
How can I get the value of each attribute in the “element” nodes ? Thanks for your help!
Why you posted an invalid XML? Did you mean –
In that case you
SimpleXML(http://www.php.net/manual/en/simplexmlelement.attributes.php)