Skip to main content.
home | support | download

Back to List Archive

Re: difference in XML2 vs HTML2 ?

From: Bill Moseley <moseley(at)>
Date: Tue Feb 03 2004 - 20:15:49 GMT
On Tue, Feb 03, 2004 at 09:46:49AM -0800, Peter Karman wrote:
> I checked check_html_tag and see where all the structural stuff is 
> defined. There's also a reference to a isinline() function. I searched 
> the site. That seems to be a feature of libxml2:
> Or am I totally off?


> All of this is to say, that after reading your response and thinking 
> about it some more, I see why the HTML2 and XML2 parsers parse 
> differently. Is it fair to say that they do that because HTML is messy 
> and typically written to represent how something should LOOK, while 
> (valid) XML is tidy and written to represent what something MEANS? Or is 
> that too simplistic?

That's about it.  
> In any case, I shall make sure to use the HTML2 parser when I want more
> 'grace' with respect to whitespace.

And hack the source when it doesn't do exactly what you want it to do.

Bill Moseley
Received on Tue Feb 3 12:15:54 2004