+ return $xmlDoc;
+ }
+
+ public function tweep($src_url) {
+ $url = parse_url($src_url);
+ if (FALSE === $url || empty($url["host"])) {
+ trigger_error("Invalid url: $src_url", E_USER_ERROR);
+ return NULL;
+ }
+
+ $xsltProcessor = $this->load_stylesheet($url["host"]);
+ if (NULL === $xsltProcessor) {
+ return NULL;
+ }
+
+ $html = $this->get_contents($src_url);
+ if (FALSE === $html) {
+ return NULL;
+ }
+
+ $xmlDoc = $this->html_to_xml($html);
+ if (NULL === $xmlDoc) {
+ return NULL;
+ }
+
+ $output = $xsltProcessor->transformToXML($xmlDoc);