Howto let the SAX parser determine the encoding from the xml declaration?
2014-04-25 11:11
525 查看
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.parsinghttp://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
相关文章推荐
- ssh搭建项目步骤
- 去掉UIWebView上下滚动出边界时的黑色阴影
- ubuntu安装gcc和编译命令
- IOS 定位服务与地图的应用开发
- JS获取操作系统及浏览器信息
- 编译makefile出错解决办法
- POJ 1700 Crossing River
- Shell脚本之sed篇
- Java for-each循环解惑
- Java学习系列(一)Java的运行机制、JDK的安装配置及常用命令详解
- 创建线程的第三种方式Callable和Future CompletionService
- Android Action Bar 详解篇
- 取消scrollView上下拉升
- Gson解析复杂Json数据
- WPF依赖属性
- # 基础(9)--网页
- PHP程序员开发应用的五大兵器
- 马云是这样骂不上进的员工,赤裸裸,但很有道理!
- 局域网实现 yum
- (转)2009-05-25 22:12 Outlook2007选择发送帐号