TI281
Information technology

JAVA XML: Mastering the SAX, DOM, and XLST APIs

Master XML processing in Java: parsing, transformation, mapping, and integration


XML is now considered essential in the design of Java EE architectures. Used as a standard data exchange format, standardized by the W3C, XML is present everywhere in applications and databases and is at the heart of EAI exchanges.

Objectives

This training course aims to develop in-depth expertise in the use of XML in Java applications. It enables participants to acquire the skills needed to manipulate XML formats via the DOM, SAX, and XSLT APIs, while understanding their differences and impact on performance. It also covers alternatives such as STAX, JDOM, and DOM4J for more tailored use depending on project requirements.

Is it for you ?

Java developers

Prerequisite

Basic knowledge of XML structure and syntax. Basic knowledge of XPath and XML schemas. Know how to create and manipulate classes, objects, interfaces, and exceptions. (Object-oriented training, not necessarily Java) Knowledge of collections (List, Map, Set) and iterators. Proficiency in input/output (I/O), particularly reading/writing text and binary files.

Your benefits

  • Handle and validate XML documents using DTDs, schemas, and structured best practices
  • Implement efficient parsers with SAX, DOM, and StAX based on application needs
  • Transform XML data with XSLT and XPath and generate outputs like HTML or PDF
  • Apply object-XML mapping using JAXB and integrate with data sources
  • Optimize XML data exchanges within information systems considering performance constraints
  • Content

    Positioning XML in Java EE XML architectures

    • Standards for manipulating XML documents: XML, XSL, DTD, Schema
    • Building a well-formed XML document: syntax rules for writing
    • Building a valid document: checking grammar with DTDs or Schema
    • Transforming XML documents with XSLT sheets: transformation rules
    • Positioning XML in information systems
    • XML for standardized data exchange between applications: EAI integration
    • XML and publishing data in different formats: HTML, PDF, others
    See more + / -
    • The issue of mapping relational RDBMS data to XML documents
    • The problem of mapping object formats with XML documents
    • Performance constraints and best practices for using XML formats in an IS
    • JAVA APIs for manipulating XML documents
    • XML parsing APIs: SAX, DOM, JDOM
    • Java XML parsers: Xerces and Xalan
    • XSLT transformation APIs and frameworks: TRAX, COCOON
    • OO-XML mapping APIs: JAXB, CASTOR
    • XML-RDBMS mapping APIs

    SAX Parsing of XML Documents

    • Introduction to the SAX and JAXP APIs
    • The SAX API: the event-driven approach and callback methods
    • The main API interfaces: ContentHandler, DTDHandler, EntityResolver, ErrorHandler
    • JAXP abstraction layer provided by SUN for accessing the SAX parser
    • SAX parsing features

    Parsing the document with the DefaultHandler helper

    • Parsing namespaces and DTD entities
    • Validating the document with a DTD or XML schema
    • Error handling with the ErrorHandler interface
    • Using XMLFilters to modify the SAX event stream

    Comparison with XML Streaming

    • Introduction to SUN's new STAX API
    • Introduction to the main Streaming APIs

    DOM parsing of XML documents

    • Presentation of the DOM and JAXP APIs
    • Presentation of the DOM API: loading the document into an object tree
    • Comparison of DOM and SAX: appropriate use of each API
    • Presentation of the main API interfaces: the Node, Document, and Element interfaces
    • JAXP abstraction layer provided by SUN for accessing the DOM parser

    DOM parsing features

    • Accessing nodes with tree functions: Node, NodeList, Element, Text, Attr
    • Accessing nodes in the document with XPATH expressions
    • Creating new nodes and assembling them in the tree with Document
    • Event management on a DOM tree: Event and EventListener
    • Persistence of changes made to the tree

    Comparison with other tree and DOM mapping technologies

    • Comparison with JDOM: advantages and disadvantages
    • Comparison with DOM4J: advantages and disadvantages
    • JAXB API: Mapping an XML document to a DOM tree

    XSLT transformation on an XML document

    • Introduction to XSL and the TRAX API
    • Reminders about XSL stylesheets and the XPATH language
    • Introduction to the TRAX API: encapsulating and organizing access to the XALAN XSLT parser

    XSLT parser features

    • Implementing XSLT transformations with different sources and results: SAX, DOM, Stream
    • Implementing XSLT transformations with parameters on the TRAX engine
    • Implementing compiled XSLTC sheets
    • Integrated grammar validation and error handling

    Generating PDF documents with XSL-FO

    • Introduction to the XSL-FO standard and main tags
    • Introduction to the FOP parser and interaction with XSLT parsers
    • XSL, XSLT, XSL-FO transformation pipeline

    Comparison with the COCOON framework

    • Introduction to the COCOON framework: automating XSLT transformations
    • Implementation of automatic transformation pipelines

    💡 Useful information

    Our training sessions are offered in Montreal or Quebec City, in person or in virtual format. Dates and locations are provided when you select your session below. If you have any questions regarding registration, schedules, the language of instruction, or cancellation policies, please consult our FAQ .

    Duration
    2 days
    Schedule
    See training dates for details
    Regular fee
    $1,035
    Preferential fee A preferential rate is offered to public institutions, to members of certain professional organizations as well as to companies that do a certain amount of business with Technologia. To know more, please read the "Registration and rates" section on our FAQ page. Please note that preferential rates are not available for online training courses. Discounts cannot be combined with other offers.
    $930
    Private or personalized training

    Do you have several employees interested in the same training course? Whether in person at your offices or remotely in virtual mode, we offer private training courses tailored to your team's needs. Group rates are available. Contact us for more details or request a quote online.

    Request a quote

    Request in-company training

    Do you have several employees interested in the same training course? Whether in person at your offices or remotely in virtual mode, we offer private training courses tailored to your team's needs. Group rates are available. Contact us for more details or request a quote online.

    Tell us more
    Added to cart View my cart