note 54316 deleted from ref.simplexml by didou

From: Date: Tue, 16 Jan 2007 00:53:45 +0000
Subject: note 54316 deleted from ref.simplexml by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121772@lists.php.net to get a copy of this message
Note Submitter: emdeboas at bronstee dot com ---- It seems not to be possible to find the name of the first XML tag in a SimpleXML document. Therefore here a simple way to find out (using the example XML): <?php include 'example.php'; $xml = simplexml_load_string($xmlstr); $dom = dom_import_simplexml ($xml); $root = $dom->tagName; echo "-- the tagname is...: $root<br/>"; //should be: movies ?>

« previous php.notes (#121772) next »