170 likes | 260 Views
COSC617 Project XML Tools. Mark Liu Sanjay Srivastava Junping Zhang. Jaxen. The jaxen project is a Java XPath Engine. Jaxen is a universal object model walker, capable of evaluating XPath expressions across multiple models.
E N D
COSC617 ProjectXML Tools Mark Liu Sanjay Srivastava Junping Zhang
Jaxen • The jaxen project is a Java XPath Engine. • Jaxen is a universal object model walker, capable of evaluating XPath expressions across multiple models. • Jaxen provides a single point for XPath expression evaluation, regardless of the target object model, whether its dom4j, JDOM, DOM, XOM, JavaBeans, or what. • Jaxen is better than werken.xpath because it better handles XPath expressions, and syntax error reporting. • Perceived to be better than other XPath technologies since it provides a single cohesive API for evaluating XPaths against multiple object models. • Learn the jaxen API, and apply it to dom4j, JDOM, XOM or DOM trees in exactly the same way. • jaxen has been embedded directly into dom4j and XOM 1.1 to provide easy XPath evaluation directly from documents. • jaxen works against an adaptor which provides InfoSet access to arbitrary object models, it should be possible to build even larger tools in terms of jaxen, to work with multiple models.
Jaxen • Major contributor: • James Strachan, Organization: Spiritsoft • http://jaxen.org/team-list.html#Contributors • Most recent stable version and date • version:1.1 beta 8 Date: 09-25-2005 • API Documentation Java • http://jaxen.org/apidocs/index.html
SAXPath • SAXPath is an event-based API for XPath parsers • It can be used to parse XPath expressions. • SAXPath is intended to be for XPath what SAX is for XML. • SAXPath package only parses XPath expressions; it does not evaluate them, or provide an object structure for representing them once they have been parsed. • SAXPath has been incorporated into jaxen and is no longer being maintained separately.
SAXPath • Contributor: • James Strachan from Spiritsoft • Most recent stable version and date • Version: 1.0FCS date: 04-25-2002 • API’s this builds on: • Java • As of 09-15-2004, this project is no longer under active development.
XML Pull Parser (XPP) • XPP is a streaming pull XML parser which can process quickly and efficiently all input elements • XPP is one level up from tokenizing XML • XPP is the simplest way of processing XML • Working with tokenizer is not simple and most of applications would be much more complex to extract useful information from XML tokens • XPP2 consists of two parts: generic API and its implementations. The implementations are pluggable and currently available default one is optimized for size and speed • On top of XPP2 parser, a very simple XML document model API is built which allows to create XML node tree incrementally (so only parts of XML document that user read from input are actually in memory).
XML Pull Parser (XPP) • Major contributor: • Aleksander Slominski from Extreme Computing Lab, Indiana University • Most recent stable version and date • Version: XPP3_1_2 date: 08-11-2005 • API Documentation Java
RELAX(Regular Language description for XML) • Main Page: http://www.xml.gr.jp/relax/ • Tutorial: http://www.xml.gr.jp/relax/html4/howToRELAX_en.html • RELAX (REgular LAnguage description for XML) is a specification for describing XML-based languages. XHTML 1.0, for example, can be described in RELAX. • RELAX grammars are represented in the XML instance syntax • RELAX borrows rich datatypes of XML Schema Part 2 • RELAX is namespace-aware
RELAX(Regular Language description for XML) • List of API’s this builds on: Java • http://www.thaiopensource.com/relaxng/api/datatype/ • Organization or individual that is developing it • Major contributor: Murata Makoto, Simon St. Laurent • Organization: http://www.jsa.or.jp/ http://www.jsa.or.jp/INSTAC/english/index.htm • Most recent stable version and date • Version: 1.0.0 2005-06-24 RELAX Schema V4.1.2.2
XOM (XML Object Model) • Main Page: http://www.xom.nu/ • Tutorial: http://www.xom.nu/tutorial.xhtml • XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance, in that order. • XOM is designed to be easy to learn and easy to use. It works very straight-forwardly, and has a very shallow learning curve. Assuming you're already familiar with XML, you should be able to get up and running with XOM very quickly. • XOM includes built-in support for a number of XML technologies including Namespaces in XML, XSLT, XInclude, and Canonical XML. XOM documents can be converted to and from SAX and DOM.
XOM (XML Object Model) • List of API’s this builds on: Java • http://www.xom.nu/apidocs/ • Organization or individual that is developing it • Major contributor: Elliotte Rusty Harold • Organization: http://www.macfaq.com/personal.html http://www.cafeconleche.org/XOM/ • Most recent stable version and date • Version: 1.0.0 2005-01-05
JDOM – Java Document Object Model • Main Page: http://www.jdom.org • Purpose, advantages, etc. • JDOM is a Java representation of an XML document. JDOM provides a way to represent that document for easy and efficient reading, manipulation, and writing. It has a straightforward API, is a lightweight and fast, and is optimized for the Java programmer. It's an alternative to DOM and SAX, although it integrates well with both DOM and SAX.
JDOM - Java Document Object Model • Purpose, advantages, etc. continued…. • Unlike SAX, JDOM can access any part of the tree at any time. Unlike DOM, all the different kinds of nodes in the tree are represented by concrete classes rather than interfaces. Furthermore, there is no generic Node interface or class which all the different node classes implement or extend. • JDOM does not itself include a parser. Instead it depends on a SAX parser with a custom ContentHandler to parse documents and build JDOM models from them. Xerces 1.4.4 is bundled with JDOM. However, it can work equally well with any SAX2 compliant parser including Crimson, Ælfred, the Oracle XML Parser for Java, Piccolo, Xerces-2, and more.
JDOM - Java Document Object Model • Has java convenience such as chaining: getChildElement("title").getText(); • Organization or individual that was developing it • founders: Jason Hunter and Brett McLaughlin • Most recent stable version and date • Version: 1.0 date: 9-9-2004
dom4j – document object model for java • Main Page: http://www.dom4j.org/ • Tutorial: http://www.dom4j.org/guide.htmlhttp://www.zvon.org/xxl/XPathTutorial/General/examples.html • Purpose, advantages, etc. • dom4j is an easy to use, open source library for working with XML, XPath and XSLT on the Java platform using the Java Collections Framework and with full support for DOM, SAX and JAXP. Contains best features from DOM and SAX and put them together into a new unified API which is optimised the for the Java platform. • One of the primary goals of dom4j is to be a flexible XML framework for Java which supports most users needs whether that be fast and efficient parsing with small memory overhead, processing very large documents or using the latest XML features such as XPath, XSLT and XML Query.
Dom4j - document object model for java • Purpose, advantages, etc. continued…. • The aim is for dom4j to be the only framework you really need on the Java platform (often need to move from DOM to SAX to handle very large documents or to move from SAX to DOM to handle complex documents) and for it to support and integrate with existing standards fully. • Organization or individual that is developing it • Major contributor: James Strachan • Note: James Strachan forked dom4j from JDOM in 2000 • http://www.dom4j.org/team-list.html • Most recent stable version and date • Version: 1.6.1, Date: 5-16-2005
Comparison of Java XML APIs Source: http://dom4j.org