Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML
 
 
Hot Web Programming Job

 

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML

Features

Technology
  Tech. Home
  GPS
  OSI
  WiMAX
  VoIP
  WiFi
  HSDPA
  LBS
  Vehicle Tracking
  SCADA
  Tech. What is?
Jobs At RoseIndia.net!
 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

The JAXP APIs

                         

JAXP doesn't do any kind of processing  instead it provides a mechanism to obtain parsed XML documents employing SAX and DOM parsers . JAXP provides a mechanism to plug-in with various providers (supporting standard specifications for DOM, SAX and XSLT ). JAXP also specifies which provider to use.

Overview of the main JAXP API Packages

 

 

 

The libraries that define needed JAXP APIs are:

javax.xml.parsers  The JAXP APIs provide a common interface for different vendors' to use SAX and DOM parsers.
org.w3c.dom Defines the Document class (a DOM) along with the classes for all of the components of a DOM.
org.xml.sax Defines the basic SAX APIs.
javax.xml.transform Defines the XSLT APIs that let's to transform XML into other forms.

The SAX API is defined in org.xml.sax  package of JAXP-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. 

The DOM API is defined in org.w3c.dom package of JAXP-APIs. The DOM API is easier to use. It provides a  tree structure of objects. The DOM API are used to manipulate the hierarchy of application objects it encapsulates. 

The XSLT APIs defined in javax.xml.transform package of JAXP-APIs. The XSLT APIs let you convert XML data to into other forms. 

javax.xml.parsers --Description

Provides classes to  process  XML documents and supports two types of plugable parsers ie..SAX and DOM Here are the following classses defined in javax.xml.parsers package:

DocumentBuilder Defines the API to obtain DOM Document instances from an XML document.
DocumentBuilderFactory Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents
SAXParser Defines the API that wraps an XMLReader implementation class
SAXParserFactory Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents

This package contains two vendor-neutral factory classes:SAXParserFactory (builds a SAXParser) and DocumentBuilderFactory (builds a  DocumentBuilder). 

TheDocumentBuilder further creates a DOM-compliant document object.

The factory APIs  enables to plug-in with the  XML implementation (provided by  any vendor without changing the source code). The obtained implementation  depends on the setting of the system properties of these factory classes javax.xml.parsers.SAXParserFactory and javax.xml.parsers.DocumentBuilderFactory . The default values (unless overridden at runtime) point to the reference implementation.

JAXP1.4 supports:

SAX 2.0
The Simple API for XML (SAX) specification provides an event-based mechanism for parsing XML documents. Various interfaces are defined in JAXP to handle different kind of events. SAX 2.0 supports  name spaces and custom event filters. 
 
DOM Core Level II 
The Document Object Model (DOM) specification provides mechanisms to build and traverse  tree-based representation of a XML document. 
DOM Level I provided core mechanisms for traversing a tree and adding, deleting, and updating content. 
DOM Level II provides support for events, namespaces, etc. 
 
XSLT 2.0
The Extensible Stylesheet Transformation(XSLT) specification defines various scripting mechanisms to transform one XML document into another.

                         

Facing Programming Problem?
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

0 comments so far (post your own) View All Comments Latest 10 Comments:

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.