I miei bookmarks

aggiornato al:
'', 'INFO' => '', 'FOLDER' => '', 'TITLE' => '', 'BOOKMARK' => '<BOOKMARK>', 'DESC' => '<DESC>' ); $close_tags = array( 'XBEL' => '</XBEL>', 'INFO' => '</INFO>', 'FOLDER' => '</FOLDER>', 'TITLE' => '', 'BOOKMARK' => '', 'DESC' => '' ); function startElement($parser, $name, $attrs) { global $open_tags, $current_tag, $depth, $tb, $hs, $na, $txt1, $txt2; $current_tag = $name; $hs++; switch($name) { case 'XBEL': break; case 'FOLDER': array_push($txt2, "
\n"); break; case 'BOOKMARK': return_page($tb); $tb = ''; break; default: break; } array_pop($depth); $hs--; } function characterData($parser, $data) { global $current_tag, $tb, $catID, $depth, $hs, $txt1, $txt2, $nb; switch($current_tag) { case 'BOOKMARK': $tb['bookmark'] .= $data; $current_tag = ''; break; case 'TITLE': $tpp = array_pop($depth); if (end($depth) == 'FOLDER') { array_push($txt2, "$data\n"); $tpp2 = array_pop($depth); if (end($depth) == 'XBEL') { $li = sprintf("
%s", $nb++, $data); array_push($txt1, $li); } array_push($depth, $tpp2); } else { $tb['title'] .= $data; $current_tag = ''; } array_push($depth, $tpp); break; case 'DESC': $tpp = array_pop($depth); if (end($depth) == 'BOOKMARK') { $tb['desc'] .= $data; $current_tag = ''; } array_push($depth, $tpp); break; case 'URL': $tb['url'] .= $data; $current_tag = ''; break; default: break; } } function return_page() { global $tb, $txt2; if ($tb['title']) { $ll = sprintf("
  • %s\n", $tb['url'], $tb['title']); array_push($txt2, $ll); $ll1 = sprintf(" - %s", $tb['desc']); array_push($txt2, $ll1); } } ?>