XML; $xml=simplexml_load_string($note); echo $xml->getName() , ""; foreach($xml->children() as $child) { echo $child->getName() . ": " , $child , ""; }