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. [...] MaisonBisson.com A bunch of stuff I would have emailed you about.   « Parse HTML And Traverse DOM In PHP? [...]

  2. 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. 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:

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 (18) - php parse html dom (16) - parse (14) - php dom (9) - php parsing html (8) - php html parse (8) - Parse html php (8) - html parser php (8) - php dom parse html (7) - php html dom parser (7) - html parse php (7) - php parse html with dom (6) - F (6) - parse HTML in PHP (5) - dom php (5) - parse html (5) - WWW XXL COM (5) - parse html with php (5) - www.sex.dom (5) - traverse DOM PHP (5) - php parser html (4) - parser html php (4) - html dom parser (3) - parsing html with php (3) - php parse bookmarks (3) - ????????? ???? (3) - Php 4 html dom (3) - parsing html php (3) - html dom php (3) - php dom parsing (3) - php html dom parse (3) - php parse (3) - php parse dom (3) - php html to dom (2) - parser dom php (2) - parse() php (2) - parse html with php dom (2) - php dom parser (2) - parser html php class (2) - php parsehtml (2) - php parse html source (2) - parse html tag php (2) - php parsear url (2) - php dom html parse (2) - parsing HTML (2) - jquery parse html (2) - php dom parse html sample (2) - traversing html php (2) - php parse dom html class (2) - php traversing dom (2) - php domdocument html parsen (2) - php 5 html dom traverse (2) - php tidy dom (2) - simplehtmldom (2) - parse html tags using php (2) - navigating the DOM with php (2) - php script parse website (2) - php parse html tag (2) - php and the DOM (2) - html parser class php (2) - DOM HTML parser php (2) - php traverse html document (2) - parse html elements using php dom (2) - parse pdf php (2) - php parsing html dom (2) - PHP DOM HTML parsing (2) - php dom html parser pdf (2) - traversing php dom (2) - php dom html parser (2) - traverse dom jquery (2) - traverse DOM (2) - php html parse dom (2) - php traverse dom document (2) - php parsing html tags (2) - parse dom php (2) - parse html with dom php (2) - php parse html document dom (2) - parse html php DOM (2) - simple html dom parser (2) - dom html php (2) - simple html dom.php (1) - traverse dom php html (1) - parsing html php dom (1) - php parse meta tag from html (1) - parsing html with dom php (1) - HTML DOM php classes CuRL (1) - php DOM parser HTML (1) - traverse html php (1) - php4 html dom parser (1) - parse html php dom css (1) - php html dom parses (1) - php: parse HTML with DomDocument (1) - dom php traverse html (1) - parsing html using php & DOM (1) - traverse DOM in php (1) - parse html with jquery (1) - parsing html using domdocument php (1) - how to parse html in php (1) - php traverse html (1) - out php-1 url (1) - parsing html in PHP4 (1) - php dom parse page (1) - parse html code wordpress (1) - traverse html dom php4 (1) - traversing DOM php (1) - php movable DOM (1) - parsing dom php (1) - using html dom in php (1) - dom php parse (1) - class parse html page php (1) - tidy traverse (1) - php dom traverse (1) - php traverse HTML documents (1) - parse dom html php (1) - www xxl dom (1) - jquery dom parser for php (1) - php google search parser (1) - php parse pdf (1) - php traversing html DOM (1) - php parse html elements (1) - php4 parse html (1) - bookmarks parser php (1) - php DOM parser class (1) - dom html php parser (1) - http://google com (1) - php tidy traverse example (1) - www.html.1.com (1) - ??????? (1) - PHP Simple HTML DOM (1) - php parsing dom tree html (1) - DOM php parser html (1) - php traversing the dom (1) - ??? (1) -