`
schy_hqh
  • 浏览: 543154 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

org.xml.sax.SAXParseException: Premature end of file

 
阅读更多
解决方案:
1、XML文档定义符合规范,即有文档定义和起始结束标签对
2、new SAXReader().read(in) 被读取的inputStream绝对不能被读过!!!
[比如上传一个xml文档到服务器,如果先进行保存,那么该xml文档就被读过了,然后再使用
new SAXReader().read(in)就会抛出Premature end of file异常!!!]

所以,如果碰到已经被读取的文件,那么新创建一个InputStream来读取文件即可!
分享到:
评论

相关推荐

    org.xml.sax.SAXException: Invalid element

    NULL 博文链接:https://wilian.iteye.com/blog/1992365

    BeRoot, 特权升级项目 Windows/Linux/Mac.zip

    BeRoot, 特权升级项目 Windows/Linux/Mac BeRoot项目BeRoot项目是一个发布工具,用于检查常见的以找到一种方法来升级我们的特权。它已经被添加到 pupy 项目作为一个post开发模块( 所以它将在内存中执行而不需要触摸...

    java调用net开发的webservice实例

    javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: The element type "p" must be terminated by the matching end-tag ...

    Matlab高阶谱分析(HOSA)工具箱及安装方法

    org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'area'. One of '{MathWorksID, type}' is expected. 运行hosaver: Warning: Could not find an exact ...

    2020-10-29日自己保存华为短信开发包smproxy.rar

    好多版本是会报错的,[Fatal Error] :24:28: An ... org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xd863) was found in the element content of the documen.,这个版本是纠正过后重新打包做的

    华为短信开发包smproxy.jar,完美无bug版

    好多版本是会报错的,[Fatal Error] :24:28: An ... org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xd863) was found in the element content of the documen.,这个版本是纠正过后重新打包做的

    android layout XML解析错误的解决方法

    org.xml.sax.SAXParseException: PI must not start with xml (position:unknown xm@3:5 in java.io.InputStreamReader@43e4b480) 经过多次查找确认XML语法没错误。 问题原因: 为XML文件第一行格式错误,仔细修改第

    SAX.java 操作xml文件

    SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件SAX.java 操作xml文件

    解决dubbo启动的时候报错,无法读取方案文档 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd'

    解决启动dubbo项目的时候出现,无法读取方案文档 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd',其实在你本地把dubbo.jar文件解压,然后在META-INF下边就有个dubbo.xsd,就是他

    Wrox.Beginning.Xml.2ed-Xml.Schemas.Soap.Xslt.Dom.And.Sax.2.0.rar

    sax2 SAX的工作原理简单地说就是对文档进行顺序扫描,当扫描到文档(document)开始与结束、元素(element)开始与结束、文档(document)结束等地方时通知事件处理函数,由事件处理函数做相应动作,然后继续同样的...

    java SE API

    JavaTM 2 Platform Standard Ed. 5.0 所有类 软件包 java.applet java.awt java.awt.color java.awt.datatransfer java.awt.dnd java.awt.event ...javax.xml javax.xml.datatype ...org.xml.sax.helpers

    XML Programming Bible

    Chapter 6: Parsing XML with SAX . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Chapter 7: XSLT Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Chapter 8: XSL ...

    解析XML所需的jar sax.jar

    解析XML所需的jar sax.jar

    dubbo.xsd 下载

    org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://code.alibabatech.com/schema/dubbo/dubbo.xsd', because 1) could not find the document; 2) the document could ...

    Javase-6.0_中文API_HTML(最新更新)

    javase 中文API 最新版 ******************************* JavaTM 2 Platform Standard Ed.... 所有类软件包 java.applet java.awt ...javax.xml javax.xml.bind javax.xml.bind.annotation ...org.xml.sax.helpers

    J2EE.v1.3.1.API.chm

    v 1.3 API Specification Compiled to .CHM by 貀vind Stegard Packages javax.activation javax.ejb javax.ejb.spi ...c.dom org.xml.sax org.xml.sax.ext org.xml.sax.helpers

    dom.sax.pull解析

    Java解析XML的三种方式 ...Ø 2、SAX(org.xml.sax) Ø SimpleAPI for XML,以事件的形式通知程序,对Xml进行解析。 Ø 3、XMLPULL(org.xmlpull.v1) Ø 类似于SAX方式,程序以“拉取”的方式对Xml进行解析。

    htmlparser

    org.htmlparser.sax.Attributes.class org.htmlparser.sax.Feedback.class org.htmlparser.sax.Locator.class org.htmlparser.sax.XMLReader.class org.htmlparser.scanners.CompositeTagScanner.class org....

    jdk 中文版

    java jdk api帮助文档中文版 JavaTM Platform Standard Ed. 6 所有类 软件包 java.applet java.awt java.awt.color java.awt.datatransfer java.awt.dnd ...javax.xml ...org.xml.sax.helpers

    mybatis-config.xml文件配置问题

     Cause: org.xml.sax.SAXParseException; lineNumber: 99; columnNumber: 17; 元素类型为 “configuration” 的内容必须匹配 “(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWra

Global site tag (gtag.js) - Google Analytics