XML+ code for DOM and SAX

来源:互联网 发布:南宁行业专用软件 编辑:程序博客网 时间:2024/06/15 19:26

SAX Parser: Xcerces, Crimson

DOM Parser: Xcerces, SunDOM, OralceDOM

 

Pull parser: 

Similar to SAX. But your code ask the parser for the next event. Your code need not implement any special interfaces, as is necessary with SAX.

 

JAXP: sun's creations, provides everything you find in SAX and DOM, as well as a few extras.

It's vender neutrality, easier use.

 

More than API: xml parsing and validation, xsl processing, xpath,

 

 

StAX: Streaming API for XML. It is a java specification.

It includes 2 kinds of api: cursor api and the event iterator api.

 

Implementation of StAX:

As of Java SE 6, a StAX implementation is included. Sun Java Streaming XML Parser(SJSXP).

 

XMLPull: a predecessor to the StAX specification. It defines a simple api similar to the StAX cursor api. the advantage the XmlPull API has over StAX is that because it's a much smaller API, it's suitable for memory-constrained environments, such as mobile devices.

 

JDOM: isn't a DOM. (open source)

 

It uses an external parser through a builder class.

 

dom4j: a java specific alternative to DOM. (interface based)

原创粉丝点击