All Projects → xparse → ElementFinder

xparse / ElementFinder

Licence: MIT License
Fetch data from HTML and XML via xpath/css and prepare it with regexp

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to ElementFinder

Xml
XML without worries
Stars: ✭ 35 (+20.69%)
Mutual labels:  dom, xpath
Jquery Xpath
jQuery XPath plugin (with full XPath 2.0 language support)
Stars: ✭ 173 (+496.55%)
Mutual labels:  dom, xpath
Browser Monkey
Reliable DOM testing
Stars: ✭ 53 (+82.76%)
Mutual labels:  dom, css-selector
Didom
Simple and fast HTML and XML parser
Stars: ✭ 1,939 (+6586.21%)
Mutual labels:  dom, xpath
CDom
Simple HTML/XML/BBCode DOM component for PHP.
Stars: ✭ 26 (-10.34%)
Mutual labels:  dom, css-selector
Css Select
a CSS selector compiler & engine
Stars: ✭ 279 (+862.07%)
Mutual labels:  dom, css-selector
Domquery
PHP library for easy 'jQuery like' DOM traversing and manipulation.
Stars: ✭ 84 (+189.66%)
Mutual labels:  dom, xpath
Jsoup
jsoup: the Java HTML parser, built for HTML editing, cleaning, scraping, and XSS safety.
Stars: ✭ 9,184 (+31568.97%)
Mutual labels:  dom, xpath
gosquito
gosquito ("go" + "mosquito") is a pluggable tool for data gathering, data processing and data transmitting to various destinations.
Stars: ✭ 25 (-13.79%)
Mutual labels:  regexp, xpath
xpath2.js
xpath.js - Open source XPath 2.0 implementation in JavaScript (DOM agnostic)
Stars: ✭ 74 (+155.17%)
Mutual labels:  dom, xpath
Graphquery
GraphQuery is a query language and execution engine tied to any backend service.
Stars: ✭ 112 (+286.21%)
Mutual labels:  regexp, xpath
Dom
Modern DOM API.
Stars: ✭ 88 (+203.45%)
Mutual labels:  dom, css-selector
Xidel
Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.
Stars: ✭ 335 (+1055.17%)
Mutual labels:  css-selector, xpath
Fluentdom
A fluent api for working with XML in PHP
Stars: ✭ 327 (+1027.59%)
Mutual labels:  dom, xpath
Pugixml
Light-weight, simple and fast XML parser for C++ with XPath support
Stars: ✭ 2,809 (+9586.21%)
Mutual labels:  dom, xpath
go-xmldom
XML DOM processing for Golang, supports xpath query
Stars: ✭ 38 (+31.03%)
Mutual labels:  dom, xpath
micell
A collection of functions for front-end development
Stars: ✭ 16 (-44.83%)
Mutual labels:  dom, regexp
Cerberus
A complete Grabber, sending data to a TCP server that you have to host and stocking all in a database.
Stars: ✭ 32 (+10.34%)
Mutual labels:  grabber
theroomjs
A vanilla javascript plugin that allows you to outline dom elements like web inspectors
Stars: ✭ 53 (+82.76%)
Mutual labels:  dom
crawler CIA CREST
R-crawler for CIA website (CREST)
Stars: ✭ 15 (-48.28%)
Mutual labels:  xpath

ElementFinder

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

Extract data from html with elegant xpath/css expressions and prepare data with regexp in single line.

Install

Via Composer

$ composer require xparse/element-finder

Usage

  $page = new ElementFinder($html);
  $title = $page->value('//title')->first();  
  echo $title;  

Advanced usage with regexp

$page = new \Xparse\ElementFinder\ElementFinder('<html>
 
<div class="tels">
    044-12-12,
    258-16-16
</div>

<div class="tels">
    (148) 04-55-16
</div>
 
 </html>');

  $tels = $page->value('//*[@class="tels"]')->split('!,!')->replace("![^0-9]!");
  print_r($tels);
  
  /* 
    [0] => 0441212
    [1] => 2581616
    [2] => 148045516
  */
  

Css selectors

Read this document. Using css selectors.

Testing

  ./vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

Xpath info

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].