Parse HTML And Traverse DOM In PHP?

I love how easily I can traverse an HTML document with jQuery, and I’d love to be able to do it in PHP. There are a few classes, but the PHP binding for Tidy seems to be where it’s at. The Zend dev pages make it look that way, anyway.

3 Comments

  1. Pingback by » Parse HTML And Traverse DOM In PHP? on March 4, 2008 8:22 pm

    [...] MaisonBisson.com A bunch of stuff I would have emailed you about.   « Parse HTML And Traverse DOM In PHP? [...]

  2. Comment by Rude on March 6, 2008 10:07 am

    Surely a nice way to cope with not strictly valid HTML Code. But: how would you do the traversing? Tidy does not offer very comfortable functions for navigating inside an HTMLs DOM.

    An example: jQuery offers possibilities such as “find all elements of class xy and change their first child’s background colour to yellow”. How could anything like this be performed in PHP?

    Cheers, Rude

  3. Comment by PHPer on March 16, 2008 6:00 pm

    Try
    “PHP Simple HTML DOM Parser”
    at
    http://sourceforge.net/projects/simplehtmldom/

Comments RSS TrackBack Identifier URI

Leave a comment

 

User contributed tags for this post:

time passing quote (37) - php parse html (35) - php html parser (23) - php dom html (21) - php html dom (20) - PHP Simple HTML DOM Parser (18) - php traverse dom (17) - php parse html dom (16) - parse (10) - php dom (9) - Parse html php (8) - php html parse (8) - php parsing html (8) - html parser php (8) - html parse php (7) - php dom parse html (7) - php html dom parser (7) - www 89 dom (6) - F (6) - php parse html with dom (6) - WWW XXL COM (5) - parse html (5) - www,89,dom (5) - xnxx_com HTML document (5) - traverse DOM PHP (5) - dom php (5) - php parser html (4) - parser html php (4) - parse html with php (4) - parsing html php (3) - html dom parser (3) - parsing html with php (3) - php parse dom (3) - html dom php (3) - www.89.dom. (3) - php parse bookmarks (3) - www.89.dom (3) - php dom parsing (3) - ????????? ???? (3) - php html dom parse (3) - php parse (3) - php parsehtml (2) - PHP DOM HTML parsing (2) - php domdocument html parsen (2) - php html to dom (2) - php traversing dom (2) - html parser class php (2) - parse html tag php (2) - parser dom php (2) - php parse html source (2) - simplehtmldom (2) - jquery parse html (2) - parse html with dom php (2) - php parse html tag (2) - php parse dom html class (2) - php dom parser (2) - php dom html parser pdf (2) - parse html tags using php (2) - parsing HTML (2) - parse html with php dom (2) - php traverse dom document (2) - php parse html document dom (2) - php parsear url (2) - parse() php (2) - navigating the DOM with php (2) - php dom parse html sample (2) - php dom html parse (2) - parser html php class (2) - traversing html php (2) - traverse dom jquery (2) - php parsing html dom (2) - simple html dom parser (2) - php html parse dom (2) - parse html elements using php dom (2) - traverse DOM (2) - DOM HTML parser php (2) - php script parse website (2) - parse dom php (2) - parse pdf php (2) - parse html php DOM (2) - php dom html parser (2) - php parsing html tags (2) - php 5 html dom traverse (2) - php and the DOM (2) - php traverse html document (2) - php4 parse html (1) - php parse html elements (1) - DOM parser php (1) - traverse tidy (1) - html to PDF php parser (1) - php parse pdf (1) - php google search parser (1) - DOM Parser parsing HTML tags (1) - php parse page by class (1) - php html tag parser (1) - jquery dom parser for php (1) - www xxl dom (1) - bookmarks parser php (1) - php DOM parser class (1) - parsing html in PHP4 (1) - parse HTML in PHP (1) - parse html code wordpress (1) - parse html php4 (1) - traverse html dom php4 (1) - traversing DOM php (1) - dom php parse (1) - php movable DOM (1) - out php-1 url (1) - php parse html jquery (1) - class parser html php (1) - php dom traverse (1) - DOM php html parser (1) - DOMDocument parse html (1) - tidy traverse (1) - parsowanie DOM PHP (1) - class parse html page php (1) - php parse meta tags (1) - php xhtml html parser (1) - using html dom in php (1) - parse dom html php (1) - ? www.89.dom (1) - parse a page with dom php (1) - traversing HTML doc with PHP (1) - xnxx html document (1) - traversing html with php (1) - php tidy dom (1) - add html code dom php (1) - tidy php (1) - php using DOM to parse html (1) - .com.89.www. (1) - how to traverse the dom in php (1) - how to parse html with php dom (1) - traverse html with php dom (1) - parsing html with dom php (1) - PHP Simple HTML DOM (1) - www.sex.dom (1) - php parsing dom tree html (1) - Php 4 html dom (1) - DOM php parser html (1) - php traversing the dom (1) - html traverse php (1) - dom parser html in php (1) - php dom parsing html (1) - php dom html tags (1) - traverse dom element php (1) - ??? (1) - php DOM parser HTML (1) -