From: andrew at shh dot fi Operating system: win32 PHP version: 5.0.3 PHP Bug Type: SimpleXML related Bug description: simplexml_load_string doesn't get root node
Description: ------------ $xml = simplexml_load_string($xml_str) returns all tags correctly except the root node. There appears to be NO WAY to get the the name of the root tag Reproduce code: --------------- $xml = '<?xml version="1.0" encoding="ISO-8859-1"?><article><title>Hello</title></article>'; $simple = simplexml_load_string($xml); print_r($simple); Expected result: ---------------- The object should include the root tag, except it starts from child of the root -- Edit bug report at http://bugs.php.net/?id=31846&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31846&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31846&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31846&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31846&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31846&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31846&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31846&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31846&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31846&r=support Expected behavior: http://bugs.php.net/fix.php?id=31846&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31846&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31846&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31846&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31846&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31846&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31846&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31846&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31846&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31846&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31846&r=mysqlcfg