xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
[XOM-interest] Problem parsing HTML file into Document
- From: "Nick Day" <the_doctor_nick AT hotmail.com>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] Problem parsing HTML file into Document
- Date: Sat, 10 Dec 2005 23:09:04 +0000
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?
thanks,
Nick
nu.xom.ParsingException: Invalid byte 1 of 1-byte UTF-8 sequence. in file:/f:/test.txt
at nu.xom.Builder.build(Builder.java:1157)
at nu.xom.Builder.build(Builder.java:614)
at nu.xom.Builder.build(Builder.java:990)
at uk.ac.cam.ch.wwmm.scuflworkers.java.StripElementsFromXMLTest.main(StripElementsFromXMLTest.java:23)
Caused by: java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence.
at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.scanLiteral(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanAttributeValue(Unknown
Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at nu.xom.Builder.build(Builder.java:1127)
... 3 more
Exception in thread "main" java.lang.NullPointerException
at uk.ac.cam.ch.wwmm.scuflworkers.java.StripElementsFromXml.strip(StripElementsFromXml.java:22)
at uk.ac.cam.ch.wwmm.scuflworkers.java.StripElementsFromXMLTest.main(StripElementsFromXMLTest.java:34)
Title: (IUCr) Contents for Acta Crystallographica Section E Vol. 61 Part 11 (November 2005)
Acta Crystallographica Section EStructure Reports OnlineVolume 61, Part 11 (November 2005)
inorganic compoundsActa Cryst. (2005). E61, i223-i224 [ doi:10.1107/S1600536805031168 ] Reinvestigation of Na3P based on single-crystal dataY. Dong and F. J. DiSalvoOnline 8 October 2005 |
-
[XOM-interest] Problem parsing HTML file into Document,
Nick Day, 12/10/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Wolfgang Hoschek, 12/10/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Nick Day, 12/11/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
John.Cowan, 12/11/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Wolfgang Hoschek, 12/12/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Elliotte Rusty Harold, 12/15/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Wolfgang Hoschek, 12/15/2005
- Re: [XOM-interest] Problem parsing HTML file into Document, Elliotte Harold, 12/19/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Wolfgang Hoschek, 12/15/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Elliotte Rusty Harold, 12/15/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Wolfgang Hoschek, 12/12/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
John.Cowan, 12/11/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Nick Day, 12/11/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Elliotte Harold, 12/11/2005
- Re: [XOM-interest] Problem parsing HTML file into Document, Tatu Saloranta, 12/11/2005
-
Re: [XOM-interest] Problem parsing HTML file into Document,
Wolfgang Hoschek, 12/10/2005
Archive powered by MHonArc 2.6.24.