Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Problem parsing HTML file into Document

xom-interest AT

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Tatu Saloranta <cowtowncoder AT>
  • To: Elliotte Harold <elharo AT>, xom-interest AT
  • Subject: Re: [XOM-interest] Problem parsing HTML file into Document
  • Date: Sun, 11 Dec 2005 09:42:15 -0800 (PST)

--- Elliotte Harold <elharo AT> wrote:

> Nick Day wrote:
> > Hi,
> >
> > I've been having a bit of trouble parsing a HTML
> file (attached) into a
> > document and keep getting the error below. Do I
> need to preprocess the
> > file into a different encoding before attempting
> the creation of the
> > Document object or am I way off?
> Your document isn't well-formed. Based on the error
> message, fixing the
> problem may be as simple as adding an encoding
> declaration. Then again,
> maybe not.

I'd guess passing in encoding specification for
ISO-8859-1 (aka ISO-Latin1) might solve the problem
(or at least allow parsing). XML parsers have to
assume UTF-8 if no other information is available, but
chances are the source doc is in some 1-byte encoding,
for which ISO-Latin1 is a reasonable gues.

-+ Tatu +-

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Archive powered by MHonArc 2.6.24.

Top of Page