xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
[XOM-interest] TagSoup, malformed comments and XOM
- From: Bart Schuller <schuller+xom-interest AT lunatech.com>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] TagSoup, malformed comments and XOM
- Date: Tue, 27 Jun 2006 22:53:24 +0200
Hi,
I have some nasty HTML to parse so I immediately tried out Tagsoup,
which produced a workable XML file. But when I tried building a XOM tree
in one step using the example from the nux page, I got an exception:
Exception in thread "main" nu.xom.ParsingException: Comment data
contains a double hyphen (--).
It turned out that the HTML had something like <!----- Here it is -->.
TagSoup deletes all comments when run from the commandline, so it
doesn't get noticed then.
It was easy enough build myself a NoCommentNodeFactory, but as it is,
the combination from the nux page does not "Just Keep On Truckin'".
Who's at fault here?
a) TagSoup, for reporting something an XML parser would never be able
to report, or
b) XOM, for not being robust/sleazy enough to change "--" to "- -" in
comments to be built or
c) the example "new Builder(new org.ccil.cowan.tagsoup.Parser())" for
being too simple?
I'm leaning towards a and maybe c.
Opinions?
--
Bart.
-
[XOM-interest] TagSoup, malformed comments and XOM,
Bart Schuller, 06/27/2006
-
Re: [XOM-interest] TagSoup, malformed comments and XOM,
Wolfgang Hoschek, 06/27/2006
- Re: [XOM-interest] TagSoup, malformed comments and XOM, John Cowan, 06/30/2006
-
Re: [XOM-interest] TagSoup, malformed comments and XOM,
John Cowan, 06/27/2006
-
Re: [XOM-interest] TagSoup, malformed comments and XOM,
Steve Loughran, 06/29/2006
-
Re: [XOM-interest] TagSoup, malformed comments and XOM,
John Cowan, 06/29/2006
- Re: [XOM-interest] TagSoup, malformed comments and XOM, Steve Loughran, 06/29/2006
-
Re: [XOM-interest] TagSoup, malformed comments and XOM,
John Cowan, 06/29/2006
-
Re: [XOM-interest] TagSoup, malformed comments and XOM,
Steve Loughran, 06/29/2006
-
Re: [XOM-interest] TagSoup, malformed comments and XOM,
Wolfgang Hoschek, 06/27/2006
Archive powered by MHonArc 2.6.24.