note 100889 added to function.simplexml-load-file

From: Date: Fri, 12 Nov 2010 23:26:19 +0000
Subject: note 100889 added to function.simplexml-load-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-173989@lists.php.net to get a copy of this message
Analyze fully XML. <?php $xml = simplexml_load_file('file.xml'); foreach($xml as $key0 => $value){ echo "..1..[$key0] => $value"; foreach($value->attributes() as $attributeskey0 => $attributesvalue1){ echo "________[$attributeskey0] = $attributesvalue1"; } echo '<br />'; //////////////////////////////////////////////// foreach($value as $key => $value2){ echo "....2.....[$key] => $value2"; foreach($value2->attributes() as $attributeskey => $attributesvalue2){ echo "________[$attributeskey] = $attributesvalue2"; } echo '<br />'; //////////////////////////////////////////////// foreach($value2 as $key2 => $value3){ echo ".........3..........[$key2] => $value3"; foreach($value3->attributes() as $attributeskey2 => $attributesvalue3){ echo "________[$attributeskey2] = $attributesvalue3"; } echo '<br />'; //////////////////////////////////////////////// foreach($value3 as $key3 => $value4){ echo "...................4....................[$key3] => $value4"; foreach($value4->attributes() as $attributeskey3 => $attributesvalue4){ echo "________[$attributeskey3] = $attributesvalue4"; } echo '<br />'; //////////////////////////////////////////////// foreach($value4 as $key4 => $value5){ echo ".....................5......................[$key4] => $value5"; foreach($value5->attributes() as $attributeskey4 => $attributesvalue5){ echo "________[$attributeskey4] = $attributesvalue5"; } echo '<br />'; //////////////////////////////////////////////// foreach($value5 as $key5 => $value6){ echo "......................6.......................[$key5] => $value6"; foreach($value6->attributes() as $attributeskey5 => $attributesvalue6){ echo "________[$attributeskey5] = $attributesvalue6"; } echo '<br />'; }}}}} echo '<br />'; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 187.42.211.4 ---- Manual Page -- http://www.php.net/manual/en/function.simplexml-load-file.php Edit -- https://master.php.net/note/edit/100889 Del: integrated -- https://master.php.net/note/delete/100889/integrated Del: useless -- https://master.php.net/note/delete/100889/useless Del: bad code -- https://master.php.net/note/delete/100889/bad+code Del: spam -- https://master.php.net/note/delete/100889/spam Del: non-english -- https://master.php.net/note/delete/100889/non-english Del: in docs -- https://master.php.net/note/delete/100889/in+docs Del: other reasons-- https://master.php.net/note/delete/100889 Reject -- https://master.php.net/note/reject/100889 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#173989) next »