Re: html to xml?

From: Date: Wed, 12 Sep 2007 09:44:59 +0000
Subject: Re: html to xml?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261999@lists.php.net to get a copy of this message
Slith wrote: > i need to parse an html page for tabular data which i can then import > into mysql so i thought converting the html to xml might be a feasible > thing to do, however, other than using tidy from the command line i > can't find a way to do this from php. > > does anyone know of any class (or other) that would allow me to do > this? or maybe i just need a different approach. Is this a one-off or will you be doing this often? For a one-off I would just use sed/grep/awk/cut/tr etc. - HTML pages are rarely syntactically correct, so trying to parse them or even turn them into XML is tiresome at best. /Per Jessen, Zürich

« previous php.general (#261999) next »