Skip to Content.
Sympa Menu

xom-interest - Re: [cowan: Re: [XOM-interest] Is it possible to use a custom DocumentBuilder ?]

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: François Beausoleil <fbeausoleil AT ftml.net>
  • To: John Cowan <cowan AT ccil.org>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [cowan: Re: [XOM-interest] Is it possible to use a custom DocumentBuilder ?]
  • Date: Sun, 08 Aug 2004 21:11:20 -0400

Hello John,

John Cowan wrote:

Francois Beausoleil scripsit:
XMLUnit has a nice DocumentBuilder implementation that makes any HTML
stream a well-formed document. My problem is that I want to use XOM's
API, because it's easier. But I need to parse any HTML, not just XHTML.

TagSoup (http://www.ccil.org/~cowan/XML/tagsoup) is just such a parser:
it presents a SAX interface to its client, but accepts arbitrary HTML.
I would very much like to know if it works with XOM, and if not, I'll
make changes so that it does.

Well, I didn't get very far, unfortunately... Here's the exception:

nu.xom.XMLException: org.ccil.cowan.tagsoup.Parser does not support the entity resolution features XOM requires.
at nu.xom.Builder.<init>(Unknown Source)
at nu.xom.Builder.<init>(Unknown Source)
at nu.xom.Builder.<init>(Unknown Source)
...
Caused by: org.xml.sax.SAXNotSupportedException: Can't change feature http://xml.org/sax/features/external-general-entities
at org.ccil.cowan.tagsoup.Parser.setFeature(Parser.java:107)
at nu.xom.Builder.setupParser(Unknown Source)
... 11 more

Thanks for the info.

Bye !
François





  • Re: [cowan: Re: [XOM-interest] Is it possible to use a custom DocumentBuilder ?], François Beausoleil, 08/08/2004

Archive powered by MHonArc 2.6.24.

Top of Page