[PHP] SimpleXML - parsing attributes with a namespace

2011-06-03 Thread Anthony Gladdish
Hi, Using following code does not parse the "xml:id" attribute. If I change the attribute's namespace to anything other than "xml" ( e.g. "new:id" ) then it works. $string = << XML; $xml = simplexml_load_string($string); foreach($xml->teiHeader->profileDesc->particDesc->person[

[PHP] SimpleXML - parsing attributes with a namespace

2011-06-03 Thread Anthony Gladdish
Hi, Using following code does not parse the "xml:id" attribute. If I change the attribute's namespace to anything other than "xml" ( e.g. "new:id" ) then it works. $string = << XML; $xml = simplexml_load_string($string); foreach($xml->teiHeader->profileDesc->particDesc->person[