Overview of the Packages JAXP
The SAX and DOM APIs are defined by the XML-DEV group and by the W3C, respectively. The libraries that define those APIs are as follows:
javax.xml.parsers: The JAXP APIs, which provide a common interface for different vendors' SAX and DOM parsers.
org.w3c.dom: Defines the Document class (a DOM) as well as classes for all the components of a DOM.
org.xml.sax: Defines the basic SAX APIs.
javax.xml.transform: Defines the XSLT APIs that let you transform XML into other forms.
javax.xml.stream: Provides StAX-specific transformation APIs.
The Simple API for XML (SAX) is the event-driven, serial-access mechanism that does element-by-element processing. The API for this level reads and writes XML to a data repository or the web. For server-side and high-performance applications, you will want to fully understand this level. But for many applications, a minimal understanding will suffice.
The DOM API is generally an easier API to use. It provides a familiar tree structure of objects. You can use the DOM API to manipulate the hierarchy of application objects it encapsulates. The DOM API is ideal for interactive applications because the entire object model is present in memory, where it can be accessed and manipulated by the user.
On the other hand, constructing the DOM requires reading the entire XML structure and holding the object tree in memory, so it is much more CPU- and memory-intensive. For that reason, the SAX API tends to be preferred for server-side applications and data filters that do not require an in-memory representation of the data.
The XSLT APIs defined in javax.xml.transform let you write XML data to a file or convert it into other forms. As shown in the XSLT section of this tutorial, you can even use it in conjunction with the SAX APIs to convert legacy data to XML.
Finally, the StAX APIs defined in javax.xml.stream provide a streaming Java technology-based, event-driven, pull-parsing API for reading and writing XML documents. StAX offers a simpler programming model than SAX and more efficient memory management than DOM.
Overview of the Packages JAXP的更多相关文章
- rebuild new environment for DW step
Steps to rebuild PPE environment: (CTS) 1, Disable both CTS Daily Job (Daily) and CTS Daily Job (Sta ...
- 星火计划ROS机器人Spark
星火计划ROS机器人Spark 1 http://wiki.ros.org/Robots/Spark 2 https://github.com/NXROBO/spark ---- Spark Spar ...
- 老李分享: Oracle Performance Tuning Overview 翻译下
1.2性能调优特性和工具 Effective data collection and analysis isessential for identifying and correcting perfo ...
- The packages can be overrided by Java Endorsed Standards
Endorsed Standards APIs The Endorsed Standards for Java SE constitute all classes and interfaces ...
- BuildTools Overview
SCons Pros: Based on a full-fledged programming language, Python. This means you can make the build ...
- Buildroot構建指南--Overview【转】
本文转载自:http://www.unixlinux.online/unixlinux/linuxjc/gylinux/201703/65218.html Buildroot構建指南--Overvie ...
- An Overview of Cisco IOS Versions and Naming
An Overview of Cisco IOS Versions and Naming http://www.ciscopress.com/articles/article.asp?p=210654 ...
- Folly: Facebook Open-source Library Readme.md 和 Overview.md(感觉包含的东西并不多,还是Boost更有用)
folly/ For a high level overview see the README Components Below is a list of (some) Folly component ...
- Python Modules and Packages – An Introduction
This article explores Python modules and Python packages, two mechanisms that facilitate modular pro ...
随机推荐
- 在 lamp(centos)下配置二级 域名 、虚拟主机
1.你得拥有一个泛域名解析的顶级域名,有一个独立的IP: 2.解析二级域名,如在万网中心里,记录类型为A, 主机记录即为要配的二级域名(如:增加两个:bbs.mydomain.com 和 www.my ...
- OpenCart框架运行流程介绍
框架运行流程介绍 这样的一个get请求http://hostname/index.php?route=common/home 发生了什么? 1. 开始执行入口文件index.php. 2. requi ...
- 用JS实现避免重复加载相同js文件
我们在日常开发过程中,可能有重复加载同一个资源例如:1.js,为了提高性能和用户体验这里我们用原生JS实现同一个资源只加载一次. 下面是 common.js里的JS代码 //使用沙箱模式防止污染外面的 ...
- WordPress标题函数wp_title()详解
在wp_title()中通常是在页面头部的title元素中.当wp_title()在主页主循环(loop)外时,可以用在模板的任何地方. 用法: <?php wp_title( $sep, $e ...
- Controllers, Actions 和 Action Results
Controllers, Actions 和 Action Results 原文:Controllers, Actions, and Action Results作者:Steve Smith翻译:姚阿 ...
- NULL, nil, Nil详解
原文地址:http://blog.csdn.net/wzzvictory/article/details/18413519 感谢原作者 作者:wangzz 原文地址:http://blog.cs ...
- CSS3 @keyframes 语法
http://www.w3chtml.com/css3/rules/@keyframes.html <!DOCTYPE html><html lang="zh-cn&quo ...
- JVM 学习笔记(二)
JVM 堆中几乎存放着java中所有的对象实例,在在垃圾回收前先要判断对象是否已死,这里对对象的判断主要有: 1. 引用计数法 给对象中添加一个引用计数器,每当有一个地方引用他时,计数器就加1:当引 ...
- Linq学习之旅——LINQ查询表达式
1. 概述 2. from子句 3. where子句 4. select子句 5. group子句 6. into子句 7. 排序子句 8. let子句 9. join子句 10. 小结 1. 概述 ...
- python JSON处理
概念 序列化(Serialization):将对象的状态信息转换为可以存储或可以通过网络传输的过程,传输的格式可以是JSON.XML等. 反序列化:就是从存储区域(JSON,XML)读取反序列化对象的 ...