when loading an XML document and converting to an array using
json_decode(json_encode(simplexml_load_string($xml)), 1);
All empty xml nodes ( <node /> ) are converted to array (). I would like them to be an empty string. Do I need to go through all the elements and replace each empty node with something else?
I am loading an XML document using $xml = new SimpleXmlElement($this->feed_uri, LIBXML_NOBLANKS | LIBXML_NOEMPTYTAG , true);
source share