XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Parsing bad HTML

On Nov 13, 2008, at 22:22, Paul M wrote:

> The problem is with 7<eight. Stray < and > seem to make tidy choke.  
> What is the best method of handling this?

I suggest using the HTML5 parsing algorithm. It has been developed to  
be implementable by browsers without breaking compatibility with real  
sites. (Of the current parsing algorithms in various browsers, the  
HTML5 parsing algorithm is closest to WebKit.)

> Maybe a Java solution?

The Validator.nu HTML Parser implements the HTML5 parsing algorithm in  
Java and exposes familiar XML APIs as if it were an XML parser parsing  
an equivalent XHTML5 document.
http://about.validator.nu/htmlparser/

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS