加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Howto let the SAX parser determine the encoding from the xml

发布时间:2020-12-16 04:59:50 所属栏目:百科 来源:网络整理
导读:The SAX parser will use the InputSource object to determine how to read XML input. If there is a character stream available,the parser will read that stream directly,disregarding any text encoding declaration found in that stream. If there

The SAX parser will use the InputSource object to determine how to read XML input. If there is a character stream available,the parser will read that stream directly,disregarding any text encoding declaration found in that stream. If there is no character stream,but there is a byte stream,the parser will use that byte stream,using the encoding specified in the InputSource or else (if no encoding is specified) autodetecting the character encoding using an algorithm such as the one in the XML specification. If neither a character stream nor a byte stream is available,the parser will attempt to open a URI connection to the resource identified by the system identifier.

http://www.kdgregory.com/index.php?page=xml.parsing

http://stackoverflow.com/questions/3482494/howto-let-the-sax-parser-determine-the-encoding-from-the-xml-declaration

http://www.saxproject.org/apidoc/org/xml/sax/InputSource.html

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读