"; //default before var $after_tem = ""; //default after function startElement($parser, $name, $attrs) { if($this->insideitem) { $this->tag = $name; } else if($name == "ITEM") { $this->insideitem = true; } } function endElement($parser, $name) { if ($name == "ITEM") { printf("$this->before_item%s$this->after_tem",trim($this->link),htmlspecialchars(trim($this->title))); $this->title = ""; $this->description = ""; $this->link = ""; $this->insideitem = false; $this->num++; } } function characterData($parser, $data) { if($this->insideitem) { switch($this->tag) { case "TITLE": $this->title .= $data; break; case "DESCRIPTION": $this->description .= $data; break; case "LINK": $this->link .= $data; break; } } } function RSSParser($feed,$numitems,$before = "