My bookmarks

 

\n"); break; case 'FOLDER': $depth++; /*if (end($stack) == 'XBEL') { $li = sprintf("top ", $na++); array_push($txt2, $li); }*/ break; case 'BOOKMARK': $depth++; $temp['url'] = $attrs['HREF']; break; default: break; } array_push($stack, $name); } function endElement($parser, $name) { global $temp, $stack, $depth, $txt2; switch($name) { case 'FOLDER': indent_write("\n"); $depth--; break; case 'XBEL': indent_write("\n"); break; case 'BOOKMARK': format_bookmark($temp); $temp = ''; $depth--; break; case 'TITLE': if (next_to_last($stack) == 'FOLDER') { format_folder($title); $temp = ''; /*if ($depth == 1) { $li = sprintf("
%s", $nb++, $data); array_push($txt1, $li); } */ } break; default: break; } array_pop($stack); } // characterData is invoked on data between tags. // WARNING: data may be fed in chunks! function characterData($parser, $data) { global $temp, $stack, $txt1, $txt2; switch(end($stack)) { case 'BOOKMARK': $temp['bookmark'] .= $data; break; case 'TITLE': $temp['title'] .= $data; break; case 'DESC': if (next_to_last($stack) == 'BOOKMARK') { $temp['desc'] .= $data; } break; case 'URL': $temp['url'] .= $data; break; default: break; } } function format_bookmark() { global $temp, $txt2; if ($temp['title']) { $l = sprintf("
  • %s", $temp['url'], $temp['title']); if ($temp['desc']) { $l .= sprintf(" - %s", $temp['desc']); } $l .= "
  • \n"; indent_write($l); } } function format_folder() { global $temp, $txt2, $depth; if ($temp['title']) { $d = $depth+1; $l = sprintf("%s\n", $temp['title']); indent_write($l); } indent_write("