ID:               31846
 Updated by:       [EMAIL PROTECTED]
 Reported By:      andrew at shh dot fi
-Status:           Open
+Status:           Bogus
 Bug Type:         SimpleXML related
 Operating System: win32
 PHP Version:      5.0.3
 New Comment:

This is correct. print_r shows you the children nodes of the choosen
node. in your code, $simple *is* the root node. I don't see anything
wrong. There's no such thing as SimpleXMLDocument Object in SimpleXML.

And yes, there is no way of getting the name of the root tag. Use DOM
if you need that.



Previous Comments:
------------------------------------------------------------------------

[2005-02-04 16:28:06] andrew at shh dot fi

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 this bug report at http://bugs.php.net/?id=31846&edit=1

Reply via email to