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.

2 Comments

  1. Rude
    Posted March 6, 2008 at 10:07 am | Permalink

    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

  2. PHPer
    Posted March 16, 2008 at 6:00 pm | Permalink

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

One Trackback/Pingback

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

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*

 

User contributed tags for this post:

time passing quote (37) - php parse html (27) - php html parser (23) - php dom html (19) - php html dom (19) - PHP Simple HTML DOM Parser (17) - php traverse dom (10) - php parse html dom (10) - php html parse (8) - php dom (8) - html parser php (7) - html parse php (7) - F (6) - php html dom parser (6) - www 89 dom (6) - php dom parse html (6) - php parsing html (6) - php parse html with dom (6) - Parse html php (5) - WWW XXL COM (5) - dom php (5) - parse (4) - php parser html (4) - parse html (4) - parsing html with php (3) - php parse dom (3) - php dom parsing (3) - php parse bookmarks (3) - ????????? ???? (3) - html dom parser (3) - php html dom parse (3) - parse html with php (3) - parser html php (3) - html dom php (3) - traverse DOM PHP (3) - php parse (3) - parsing html php (2) - php parsing html dom (2) - parsing HTML (2) - php parsing html tags (2) - php html to dom (2) - parse html tag php (2) - jquery parse html (2) - parser html php class (2) - parse html elements using php dom (2) - php dom parser (2) - php parse html source (2) - php parsehtml (2) - php parsear url (2) - php dom html parser pdf (2) - php parse dom html class (2) - parse dom php (2) - navigating the DOM with php (2) - php dom html parser (2) - php dom parse html sample (2) - parse() php (2) - traverse dom jquery (2) - simple html dom parser (2) - parse html php DOM (2) - php parse html document dom (2) - php and the DOM (2) - html parser class php (2) - php parse html tag (2) - parser dom php (2) - DOMDocument parse html (1) - jQuery DOM parsing (1) - php curl google parse (1) - dom parse website (1) - parsowanie DOM PHP (1) - html parser php dom (1) - php parse page by class (1) - html to PDF php parser (1) - php parser example (1) - DOM parser php (1) - php traverse html document (1) - class parser html php (1) - traverse tidy (1) - DOM Parser parsing HTML tags (1) - DOM HTML parser php (1) - how to prase a HTML in DOM (1) - parsing blog html (1) - php html mail (1) - php google news parser (1) - php dom tag (1) - parse url from html php (1) - curl php dom examples (1) - parsing html with dom library php -xml (1) - parse html dom (1) - php xhtml dom class (1) - php html parsing (1) - php class parse html tags (1) - php class html tags (1) - parse html comments (1) - php html dom class (1) - php google news parse (1) - php html tag parser (1) - ?????? php (1) - javascript parse website (1) - parse html iphone (1) - traverse dom php html (1) - parsing html php dom (1) - simple html dom.php (1) - parsing html with dom php (1) - parsing html using domdocument php (1) - how to parse html in php (1) - php traverse HTML documents (1) - parse dom html php (1) - www.89.dom (1) - php DOM parser HTML (1) - parsing html using php & DOM (1) - www'89.dom (1) - php traversing dom (1) - HTML DOM php classes CuRL (1) - traverse html php (1) - php4 html dom parser (1) - parse html php dom css (1) - traversing html php (1) - php: parse HTML with DomDocument (1) - dom php traverse html (1) - www xxl dom (1) - jquery dom parser for php (1) - php google search parser (1) - traversing DOM php (1) - php movable DOM (1) - using html dom in php (1) - dom php parse (1) - parse pdf php (1) - parse html php4 (1) - php parse html jquery (1) - php xhtml html parser (1) - DOM php html parser (1) - traverse html dom php4 (1) - parse html code wordpress (1) - parsing html in PHP4 (1) - php parse pdf (1) - php parse html elements (1) - php4 parse html (1) - bookmarks parser php (1) - php DOM parser class (1) - tidy traverse (1) - class parse html page php (1) - PHP DOM HTML parsing (1) - out php-1 url (1) - php parse meta tags (1) - parse html document php (1) - html to dom (1) - class php parsing html (1) - parse bookmarks php (1) - php parse html links class= (1) - php parse xhtml (1) -