Get the Flash Player to see this player.
Logo Design by
Logo Design by FlamingText.com

quinta-feira, 27 de setembro de 2012

XPath Tester


Hits: 875  

XPath, the XML Path Language, is a query language for selecting nodes from an XML/HTML document.

Most Scrapping Tools use XPath to grab data from websites, XPath is very useful to scrape web resources like RSS, XML, HTML, CSS etc.

Scriptrr

scriptrr

* Web Data Extraction
* Screen Scrapping
* Web Data Mining
* Web Spider
* Email Extractor
* Data Extractor
* Web Grabber
* Yellow pages Extractor
* Google Crawler
* Data Mining Services

Scriptrr is Website Scraper | Forum Crawler | Screen Scrapping | Data Mining Tool | Craigslist Scraper.

Scriptrr can parse and store web data in database then export scrapped data into CSV, Excel, XML, SQL, RSS, TXT, PDF, JSON, HTML.

url=$string;    }        publicfunction _set_query($string){        $this->query=$string;    }        publicfunction execute(){        $doc=new DOMDocument();                @$doc->loadHTMLFile($this->url);        $xpath=new DOMXpath($doc);        $elements=$xpath->query($this->query);        if(!is_null($elements)){          foreach($elementsas$key=>$element){            $nodes=$element->childNodes;            foreach($nodesas$node){              $data[]=rtrim(ltrim($node->textContent));            }          }        }                return$data;    }  }            $xpathtester=new XPathTester();    $xpathtester->_set_url("http://blog.svnlabs.com/");    $xpath='//div[@id="content"]//h2//a//@href';        $xpathtester->_set_query($xpath);    $array=$xpathtester->execute();        var_dump($array);        ?>

Test Run

QVC.png
QVC.xml
QVC.xls

“If you can see (or hear) it, you can steal it.”


View the original article here

Nenhum comentário:

Postar um comentário