Skip to content
Advertisement

Tag: simplexml

How to use XMLReader in PHP?

I have the following XML file, the file is rather large and i haven’t been able to get simplexml to open and read the file so i’m trying XMLReader with no success in php I’ve unfortunately not found a good tutorial on this for PHP and would love to see how I can get each element content to store in

Accessing @attribute from SimpleXML

I am having a problem accessing the @attribute section of my SimpleXML object. When I var_dump the entire object, I get the correct output, and when I var_dump the rest of the object (the nested tags), I get the correct output, but when I follow the docs and var_dump $xml->OFFICE->{‘@attributes’}, I get an empty object, despite the fact that the

Advertisement