Fast Track to XML and Java
This course provides a complete introduction to XML and the Java XML APIs. The course is a balanced mixture of theory and practical labs, designed to take students from the basic fundamentals of XML, right through to mastery of the standard Java XML APIs. The students are walked through the different standards in a structured manner, to enable them to master the concepts and ideas, which are reinforced in the lab exercises.
The course starts with the fundamentals of XML including document structure, and XML Schema. It then moves on to the basic relationship between Java and XML, including generating XML from Java and the mapping between Java and XML objects. Finally, students are taken through a detailed and hands-on examination of the two main JAXP APIs – SAX 2.0 and DOM 2.0. The course concludes with a look at some Java and XML related topics.
Course Objectives:
Course Outline:
- + expand all | - collapse all
-
- XML Defined
- Benefits of Using XML, comparison to HTML
- Origins of XML.
- XML Standards
- XML Usage Examples
-
- XML Document Structure
- The document body
- Elements, tags, and attributes, well-formed elements
- Prolog, XML Declaration and PIs.
- Entities, CDATA
-
- The Motivating Problem
- The Namespace Solution (Definition, qualified names, URIs, prefixes)
- Namespace scope and overriding
- Default Namespaces
- Namespaces and Attributes
-
- Valid XML documents, Schema languages, DTDs
- XML Schema Basics
- Schema form - Elements, Attributes and Types
- Element Definitions
- Simple and Complex Types
- Primitive and Derived Datatypes
- Complex Types - Sequence, Choice, All
- Element Occurrence Constraints
- Attribute Definitions
- Attribute Occurrence Constraints
- SimpleContent Type
- Using XML Schema with Namespaces
- [Optional] The Document Type Definition
- Role and Function
- Internal/External DTD
- Elements and attributeds
- CDATA, NMTOKEN
- [Optional] XML Schema Advanced Topics
- Element and Attribute Group Definitions
- Deriving Simple Types
- Deriving Complex Types
- The any Types/li>
-
- How Java and XML work together.
- Simple generating of XML from Java Objects
- Parsing XML - Push (SAX), Pull (StAX), Tree (DOM)
- JAXP, SAX 2.0, StAX 1.0, DOM APIs
- Instantiating Parsers with JAXP
- SAXParserFactory/SAXParser
- DocumentBuilderFactory/DocumentBuilder
-
- Primary Components of SAX
- Setting up for a Parse
- Handling Document Errors
- Handling Document Content
- SAX Features and Properties
- SAX Extensions
-
- What is DOM?
- XML Document as a DOM Tree
- Getting a DOM Tree from the Parser
- Manipulating the DOM Tree
- Transforming a DOM Tree Back to XML
-
- StAX Parser Overview
- Performance Issues
- JAXB Overview
- JDOM Overview