关于XML的出错'Malformed UTF-8 char'的问题

来源:百度知道 编辑:UC知道 时间:2024/05/16 05:33:13
我在使用Web-Harvest的时候。解析一个XML文件的时候报错。
org.xml.sax.SAXParseException: 字符转换错误:“Malformed UTF-8 char -- is an XML encoding declaration missing?”(行号可能太小)。
at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1150)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:620)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
at org.webharvest.definition.XmlParser.parse(Unknown Source)
at org.webharvest.definition.XmlNode.getInstance(Unknown Source)
at org.webharvest.definition.Scr

at org.webharvest.definition.XmlNode.getInstance(Unknown Source)
at org.webharvest.definition.ScraperConfiguration.<init>(Unknown Source)
at org.webharvest.definition.ScraperConfiguration.<init>(Unknown Source)
at org.webharvest.definition.ScraperConfiguration.<init>(Unknown Source)
at org.webharvest.runtime.processors.IncludeProcessor.execute(Unknown Source)
at org.webharvest.runtime.processors.BaseProcessor.run(Unknown Source)
at org.webharvest.runtime.Scraper.execute(Unknown Source)
at org.webharvest.runtime.Scraper.execute(Unknown Source)
at net.oatn.test.Test.main(Test.java:23)

xml文件编码出问题了?
不是utf-8