1

When I pass the XML file in simplexml_load_file to convert the XML tag into the Array its always skip the XML tag which name include the ':' value. Please advice how we convert such XML tag in to the Array.

Code:

$xmlArray=simplexml_load_file("WordPress.xml");

XML tag which not converted into the Array:

<wp:post_id>11149</wp:post_id>
Nigel Ren
  • 56,122
  • 11
  • 43
  • 55
Wiram Rathod
  • 1,895
  • 1
  • 19
  • 41
  • 1
    please paste minimal XML example where your tags are skipped. And BTW, your xml snippet is not well-formed -> namespaces should be defined in root element. – Agnius Vasiliauskas Jul 20 '18 at 12:29
  • 2
    Possible duplicate of [Parse XML with Namespace using SimpleXML](https://stackoverflow.com/questions/595946/parse-xml-with-namespace-using-simplexml) – Nigel Ren Jul 20 '18 at 15:58

0 Answers0