From: okycastro at gmail dot com Operating system: windows vista PHP version: 5.2.12 PHP Bug Type: *XML functions Bug description: simplexml_load_string not finding any data
Description: ------------ simplexml_load_string not producing the expected results Reproduce code: --------------- $xml = <<<XML <?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:createBanResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://ws.interfaces.sessions.APILink.amdocs"> <createBanReturn href="#id0" /> </ns1:createBanResponse> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:OutCreateBanInfo" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://io.datainfo.APILink.amdocs"> <ban xsi:type="xsd:int">688666259</ban> </multiRef> </soapenv:Body> </soapenv:Envelope> XML; $root = simplexml_load_string($xml); var_dump($root); //EMPTY $result = $root->xpath("ban");//EMPTY print_r($result);//EMPTY Expected result: ---------------- I expected some data from the xml. For example xpath should return 688666259. I use simplexml_load_string many time and never have problems. I never used it with an xml with so many attributes. Actual result: -------------- Array ( ) object(SimpleXMLElement)#1 (0) { } -- Edit bug report at http://bugs.php.net/?id=50805&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50805&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50805&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50805&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50805&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50805&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50805&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50805&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50805&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50805&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50805&r=support Expected behavior: http://bugs.php.net/fix.php?id=50805&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50805&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50805&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50805&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50805&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50805&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50805&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50805&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50805&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50805&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50805&r=mysqlcfg
