PHP Classes
elePHPant
Icontem

HTML SQL: Parse and extract information from HTML using SQL

Recommend this page to a friend!

  Author Author  
Picture of J.
Name: J. <contact>
Classes: 1 package by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz  
This class can be used to parse and extract information from HTML documents using a query language similar to SQL to define the information to be extracted.

The class can open HTML documents stored as local files or as remote pages using the Snoopy class.

The class can execute a query with a syntax similar to SQL SELECT statements to search an find certain tags in the opened document with attributes that match query condition.

The occurrences that it find are returned as result set rows that may contain a given list of attributes of the matched tags.

  Classes of J.  >  HTML SQL  >  Download Download .zip .tar.gz  >  Support forum Support forum (6)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: HTML SQL
Base name: htmlsql
Description: Parse and extract information from HTML using SQL
Version: -
PHP version: -
License: BSD License
 
  Groups   Screenshots Screenshots   Trackback  
  Applications   Related pages   Files Files  

  Groups  
Group folder image HTML HTML generation and processing View top rated classes
Group folder image Text processing Manipulating and validating text data View top rated classes

  Files folder image Screenshots  
htmlsql_syntax_example.png
File Role Description
Accessible without login Image file htmlsql_syntax_example.png Screen htmlSQL syntax example


  Innovation Award  
PHP Programming Innovation award nominee
May 2006
Number 2


Prize: One subscription to the PHP Magazine
Certain types of applications need to retrieve HTML pages and extract information from them to be processed for specific purposes.

Often, parsing HTML pages to extract only the relevant information is not an easy task. On the other hand, most Web developers are very familiar with SQL and can use it to define what information they want from their database tables.

This class provides a means to extract data from HTML pages using a query language very similar to SQL. It simplifies greatly the implementation of scripts that need to process data from HTML pages.

Manuel Lemos

  Pages that reference this package  
HTML SQL » Burak Kanmaz
3-4 yildir ben bir web sayfasinin icerigini analiz edecek bir web sayfasi yapmayi hayal etmisimdir hep...
Navegar un pagina en HTML con querys en SQL.
HTML_SQL es el nombre de una clase en PHP que nos permite navagar una pagina en HTML, con querys hechos en SQL. La clase ha ganado el segundo lugar de los premios de innovación en PHPClasses. Esto es sin duda, un avance interesante. Se le podran dar habilidades extras a los frameworks MVC. Algunos ejemplos en el enlace. Saludos

Latest pages that reference packages Latest pages that reference packages


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.


  Related pages  
A detailed htmlSQL description
A detailed htmlSQL description
htmlSQL live demo
Test the htmlSQL class...

  Files folder image Files  
File Role Description
Files folder imageexamples (15 files)
Accessible without login Plain text file htmlsql.class.php Class Contains the main htmlSQL class
Accessible without login Plain text file snoopy.class.php Class The famous snoopy class by Monte Ohrt - v1.01
Accessible without login Plain text file readme.txt Doc. English readme with description and todo list
Accessible without login Plain text file readme_german.txt Doc. The same as the readme.txt just in german language

  Files folder image Files  /  examples  
File Role Description
  Accessible without login Plain text file demo_01.php Example Example 1 - Shows a simple query
  Accessible without login Plain text file demo_02.php Example Example 2 - Shows a simple query and the "href as url" usage
  Accessible without login Plain text file demo_03.php Example Example 3 - Shows how to connect to a file and a simple query
  Accessible without login Plain text file demo_04.php Example Examples 4 - Shows a advanced query with preg_match
  Accessible without login Plain text file demo_05.php Example Example 5 - Shows a advanced query (with substr)
  Accessible without login Plain text file demo_06.php Example Example 6 - Show how to connect to a string
  Accessible without login Plain text file demo_07.php Example Example 7 - Shows a complex query
  Accessible without login Plain text file demo_08.php Example Example 8 - Shows how to parse a RSS/XML file with htmlSQL
  Accessible without login Plain text file demo_09.php Example Example 9 - Shows how to use the "select" function
  Accessible without login Plain text file demo_10.php Example Example 10 - Shows how to use the "isolate_content" function
  Accessible without login Plain text file demo_11.php Example Example 11 - Shows how to query a simple XML file
  Accessible without login Plain text file demo_12.php Example Example 12 - Shows how to replace the user agent and the referer with custom values
  Accessible without login Plain text file demo_data.htm Example Demo HTML data (used for parsing examples)
  Accessible without login Plain text file demo_xml.xml Example Example XML file (to test parsing)
  Accessible without login Plain text file query_examples.txt Doc. Some query examples for copy and paste

Download Download all files: htmlsql.tar.gz htmlsql.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.