Programming XML with Java — A 3-day course
Synopsis
XML has become popular as a way of representing, transmitting and storing data in a platform and application independent format. This course provides an in-depth introduction to what XML is and how to use it in Java applications. It teaches the major XML technologies that are commonly used within Java applications.
Suitable For
- Java programmers who want to learn how to manipulate XML from within Java code. Practical experience of using Java to write applications. Knowledge of XML basics would be useful, but is not essential.
Prerequisites
- None
Publicly scheduled dates, locations, and prices
A schedule of dates for this course is not currently available. Please call 0800 651 0338 or use our contact form to enquire about places and availability.
Contents
Introduction
- What is XML?
- XML, XHTML and HTML
- Uses of XML
XML Basics
- Document structure
- XML declaration
- Processing instructions
- Elements
- The Root Element
- Attributes
- CDATA and escaping special characters
Namespaces in XML
- The need for namespaces
- Defining namespaces
- Default namespaces
- Using namespaces correctly
Validation with DTDs
- Overview of DTDs
- Defining elements and attributes
- Defining entities
- DTDs and namespaces
Validation with XML Schema
- Introduction to XML Schema
- Schemas and DTDs
- Defining elements and attributes
- Defining simple types and complex types
Push Parsing using SAX
- XML parsing techniques: SAX, StAX and DOM
- Overview of SAX
- Handling elements, attributes, and content
- Error handling and validation
- SAX and JAXP
Pull Parsing using StAX
- Overview of StAX
- Handling elements, attributes, and content
- Error handling and validation
- StAX and JAXP
Tree Parsing using DOM
- What is DOM?
- Stream parsing versus tree parsing
- DOM and JAXP
- Building a DOM tree
- Navigating a tree
- Modifying content
- Error handling and validation
Using XPath in Java
- Introduction to XPath
- Using XPath in Java
- Filtering results
- Using XPath functions and operators
Java and XSLT
- Overview of XSLT
- Using XSLT in Java
- Defining overloaded template rules
- Loops and decision making in XSLT
- Sorting results
- Defining and calling named template rules
- Parameterising template rules
- Using JAXP transformers
