Surendar

7638 mots 31 pages
Chapter 1

Introduction to JAXP

The Java API for XML Processing (JAXP) is for processing XML data using applications written in the Java programming language. JAXP leverages the parser standards Simple API for XML Parsing (SAX) and Document Object Model (DOM) so that you can choose to parse your data as a stream of events or to build an object representation of it. JAXP also supports the Extensible Stylesheet Language Transformations (XSLT) standard, giving you control over the presentation of the data and enabling you to convert the data to other XML documents or to other formats, such as HTML. JAXP also provides namespace support, allowing you to work with DTDs that might otherwise have naming conflicts. Finally, as of version 1.4, JAXP implements the Streaming API for XML (StAX) standard.
Designed to be flexible, JAXP allows you to use any XML-compliant parser from within your application. It does this with what is called a pluggability layer, which lets you plug in an implementation of the SAX or DOM API. The pluggability layer also allows you to plug in an XSL processor, letting you control how your XML data is displayed.

The JAXP APIs

The main JAXP APIs are defined in the javax.xml.parsers package. That package contains vendor-neutral factory classes,SAXParserFactory, DocumentBuilderFactory, and TransformerFactory, which give you a SAXParser, aDocumentBuilder, and an XSLT transformer, respectively. DocumentBuilder, in turn, creates a DOM-compliant Documentobject.
The factory APIs let you plug in an XML implementation offered by another vendor without changing your source code. The implementation you get depends on the setting of the javax.xml.parsers.SAXParserFactory,javax.xml.parsers.DocumentBuilderFactory, and javax.xml.transform.TransformerFactory system properties, using System.setProperties() in the code, in an Ant build script, or -DpropertyName="..." on the command line. The default values (unless overridden at runtime on the command line

en relation

  • Zerzer
    966 mots | 4 pages
  • Survenant
    387 mots | 2 pages
  • Activite python Python
    768 mots | 4 pages
  • Serrure
    586 mots | 3 pages
  • Scénar
    1435 mots | 6 pages
  • cv younes
    325 mots | 2 pages
  • Stendhal
    707 mots | 3 pages
  • Sobidor
    292 mots | 2 pages
  • Survenant
    251 mots | 2 pages
  • Survenant
    551 mots | 3 pages
  • Sap netweaver
    1534 mots | 7 pages
  • Survenant
    3072 mots | 13 pages
  • Survenant
    321 mots | 2 pages
  • Java Pers
    65402 mots | 262 pages
  • Developpement logiciel
    24926 mots | 100 pages