$title:
$descr"; if ($link != "") { print " [more ...]"; } } // this is the main function that splits up the XML data function getXmlData($xml_doc) { $ar=array(); // parse the XML document $p = xml_parser_create(); xml_parse_into_struct($p, $xml_doc, $vals, $index) or die(xml_error_string(xml_get_error_code($p))); xml_parser_free($p); $ttags=array(); // Temporary arry for storing tag names for($n=0;$n<=count($vals)-1;$n++) { if(trim($vals[$n][value])) { $ar[$vals[$n][tag]][count($ar[$vals[$n][tag]])]=$vals[$n][value]; $ttags[$vals[$n][tag]]=$vals[$n][tag]; } } // extract and save the tag names to the array $tags=array(); foreach($ttags as $tagi) { array_push($tags,$tagi); } return $ar; } ?>