parsing html / xml

From: Date: Wed, 07 Mar 2001 16:56:48 +0000
Subject: parsing html / xml
Groups: php.general 
Request: Send a blank email to php-general+get-42914@lists.php.net to get a copy of this message
I'd like to parse a html file in much the same way the xml parser works. Ie calling a method for every tag encountered and so on. The xml parsing methods don't seem to be forgiving enough for much of the html that's out there. For example, many html files have tags like this: <TABLE border=0> but xml_parse() will choke on it because there are no quotes around the "0". Also html tags are, in practice, case insensitive, so this is found in many html documents: <B>This is bold</b> but xml_parse() doesn't like it because it expects the opening and closing tags to be same-case. Are there other functions or libraries I'm not aware of that help in parsing html? Or some options in xml_parse to get by these problems? Thanks in advance. Nate

« previous php.general (#42914) next »