Hi all,
I came across “Simple HTML DOM Parser” recently that allows jQuery like DOM selection. This function is quite handy to do some kungfoo DOM manipulation on the fly!
I needed to use it on codeIgniter so modified the files and integrated it into a single codeIgniter library. The original files can be accessed from here its sourceforge project page. For the codeigniter version of the library click here.
-
$this->load->library(‘domparser’);
-
$html = $this->domparser->file_get_html(‘http://www.google.com/’);
-
$rank = $html->find(‘b.gb1′);
-
For further utility functions of the DOM parser visit this link.
Feel free to comment or contact me directly for any query.
take care,
thephpx
2 responses so far ↓
1 Kyle Farris // Oct 26, 2009 at 2:48 am
Quite spiffy sir. Thanks.
2 Daniel // Mar 5, 2010 at 8:46 pm
Hey,
Thanks for the files… am about to test it now. Will post back if any problems
Do you have any idea what version of CI you modified the files for?
fingers crossed : )
Leave a Comment