Java XML Course Description.
Course Objectives:
- Learn how XML is used in Java applications.
- Learn the structure of an XML document.
- Learn how to read and write XML documents using standard APIs (SAX, DOM, JAXP).
- Learn to define XML vocabularies using DTD and XML Schema
- Learn how to transform XML documents from one format to another using XSLT and XPath.
Prerequisites:
- Students should know Java.
This course includes the following material:
- A Java XML textbook: Java & XML . Brett McLaughlin, O'Reilly
- A set of course notes
Outline:
1. XML Overview
What is XMLWhy XML
Getting started with XML
Anatomy of an XML Document (Elements, Attributes, Processing Instructions, Entities References)
XML Namespaces (xmlns attribute, namespace prefix, default namespace)
2. Parsing XML
Apache Xerces 2 and Crimson XML parsers
SAX API
Parse an XML document using an event based push model
Create a SAX parser instance by loading an XMLReader statically and dynamically
Implement the ContentHandler interface and extend the adapter class, DefaultHandler
Create a ErrorHandler to handle parsing errors
DOM API
Parse the contents of an XML document using DOM
Learn the different types of nodes in a DOM Document
Traverse a DOM Document using DOM API
Use the DOM API to create an XML document from scratch
Serialize a XML document to a file.
JAXP API
Create a SAX parser
Create a DOM parser
3. Validating XML
DTDDocument Type Declaration
External and Internal DTD Subsets
Define Elements, Attributes, Text and Mixed Content
Atrribute Types (CDATA, NMTOKEN, NMTOKENS, ENTITY, ENTITIES, ID, IDREF, IDREFS)
4. XMLSchema
Define a schemaAssociate a document instance with a schema
Enabling schema validation in XML parser
XMLSchema built-in datatypes
simpleType, complexType
simpleContent, complexContent
Derive user-defined types by extension and restriction
Multiple schemas
5. XML Transformations
Use XSLT and XPath APIs to transform XML documentsCreate XSLT templates to define transformation rules
Transform XML documents to HTML
