EC52 - XML for Java Programmers - 3 Days

View Dates and Locations

Course Description

This course is designed for Java and web developers looking to further their web application development skills with XML. This course teaches developers how to write, analyse and resolve XML tags and coding errors. Developers will learn how to write customised tags and specify how the tags should be interpreted through XML grammars, document type definition (DTD) documents and XML schemas. Developers taking this course will also learn how to use XSLT to transform XML documents. The course also covers how Java can be used to validate, parse, transform and create XML documents.


Pre-requisites

The developer should be familiar with the Windows host environment. Knowledge of the Java programming language is required, as Java is used to validate and manipulate XML documents. This can be gained by attending course EC22.


Objectives

Whilst covering the basics of XML and how it is used, this course also aims to give an insight into XML syntax, namespaces, grammars and document presentation.

Issues such as XML syntax, namespaces, document type definitions, XML schemas, CSS style sheets and XSL transformations are discussed.

On completion of this course the student will be able to:

  • Develop XML documents using XML valid syntax
  • Define XML namespaces
  • Develop XML grammars, DTDs, and validate against an XML instance
  • Develop XML grammars, XML schemas, and validate against an XML instance
  • Develop document presentation using CSS style sheets
  • Develop document presentation using XSL transformations
  • Validate and transform XML documents using SAX 2.0
  • Validate and transform XML documents using DOM 2.0
  • Validate and transform XML documents using the XSLT API
  • Validate and transform XML documents using the JDOM API

Environment

XML development will be performed using a text editor:

  • Notepad or TextPad
  • XML Spy

A web browser such as:

  • Internet Explorer or
  • Firefox or
  • Opera or
  • Chrome

A Java IDE such as:

  • Eclipse
  • NetBeans
  • Websphere Studio Application Developer
  • Rational Application Developer
  • JBuilder
  • Java Development Kit (JDK) plus a text editor

Customisation

For on-site courses (i.e. at your premises), we are more than happy to tailor the course agenda to suit your exact requirements. In many cases, we are able to build your in-house standards and naming conventions into the delivered course.

On-site course enquiry (from £165 pp per day)

Course Details

XML INTRODUCTION
XML Applications and Data
Standardised Generalised Mark-Up Languages
Meta Mark-Up Languages
Extensible Mark-Up Language - XML
Documents
Applications
Grammars
Parsers
Features

XML DOCUMENTS
XML Document Structure
Tags & Elements
Attributes
Well Formed Documents
Valid XML Documents
Viewing an XML Document
Using CSS Style Sheets
Using XSL Transformations

XML SYNTAX
XML Documents
XML Declaration
Elements
Element Hierarchy
Empty Elements
XML Names
Entity References
CDATA Sections

NAMESPACES
Namespace Definition
Uniform Resource Identifier
Namespace Syntax
Binding Prefixes to Namespace URIs
Default Namespaces
Non-Default Namespaces

XML GRAMMARS
XML Validation
XML Parsers & Validators
Document Type Definitions
XML Schemas

DOCUMENT TYPE DEFINITION (DTD)
DTD
Definition
Declaration
Formats
DTD Declaration
Internal Declarations
External Private Declarations
External Public Declarations
DTD Content
!ELEMENT Declaration
Content Model
#PCDATA
Child Elements
Empty
Any
Mixed Content
!ATTLIST Declaration
Attribute Type
CDATA
NMTOKEN & NMTOKENS
ENUMERATION
ENTITY & ENTITIES
ID
IDREF & IDREFS
NOTATION
Processing Instructions

XML SCHEMAS
Schema Status
Schema Elements & Attributes
Simple Types
Complex Types
Elements
Attributes
ComplexType
Compositors
Sequence
Choice
All
Attributes
Empty Elements
Attaching an XML schema to an Instance Document
XML Schema
Schema Structures
Using References
Using Groups
User-defined Simple Types
User-defined Complex Types
Content Type Libraries

XML ON THE WEB
Why Use XHTML
Converting HTML to XHTML
XML Namespaces
XML Presentation

XML DOCUMENT PRESENTATION
CSS Style Sheets or XSL
Stylesheets
CSS Stylesheets
XSL Transformations

CSS STYLE SHEETS
Using CSS Style Sheets with XHTML
Style Sheet Types
Inline Stylesheets
Document Level Stylesheets
External Stylesheets
Using CSS Stylesheets with XML

XSL TRANSFORMATIONS
XSL
Stylesheet
Transformations
Processors
XSL
Template
Value-Of
Apply-Templates
Pattern Mathcing
By Position
By Filters
Advanced Pattern Techniques
XSLT Language Constructs
Choose Constructs
If Constructs
For-Each Consturcts

THE JAXP API
The Simple API for XML - SAX
The Document Object Model - DOM
When to use the SAX and the DOM

THE SAX 2.0 API
The Java SAX Packages
SAX APIs
Creating a SAX Parser
SAX Parser Factory
Creating the SAX Class
Importing the required Classes
Setting Up the Parser
Implementing the ContentHandler Interface
Writing the XML Output
Identifying the Document Location
Passing Processing Instructions to the Parser
Validating Parsers
Handling Errors
Fatal Errors
Catching a SAXParseException
Catching a SAXException
Handling a SAXPException
Non Fatal Errors
Handling Non Fatal Errors
Handling Warnings
Schema Validation
Tracking Ignorable Whitespace
Switching Special Characters
Implementing Interfaces
DTDHandler Interface
EntityResolver Interface
Converting from SAX 1.0 to SAX 2.0

THE DOM 2.0 API
Creating a DOM Parser
Importing the Required Classes
Setting Up the Parser
Handling Errors
Displaying a DOM Hierarchy
Node Translation
Navigating the DOM Hierarchy
Generating a DOM from First Principles
Converting from DOM 1.0 to DOM 2.0

THE XSLT API
XSLT Packages
Transforming a DOM Into an XML Document
Transforming a DOM Subset

THE JDOM API
What Is JDOM ?
Why Use JDOM ?
The JDOM Packages and Classes
Processing a JDOM Document
Outputting a JDOM Document
Creating an XML Document
Formatting an XML Document
Reading Parts of a Document

THE FUTURE OF XML
XML Futures
XML Web Sites


Course Format

Practical sessions make up a large part of the course, allowing delegates to demonstrate and reinforce the lectures given. During these sessions the delegate will gain experience of coding all types of XML documents and XML syntax as well as validating against existing XML processors and validators. Developers will code both SAX and DOM parsers to validate and parse XML documents.

Examples are used extensively, ranging from simple code snippets to full applications with complete 'real world' functionality. These are supplied at the start of the course and it is encouraged that the delegates execute and 'experiment' with these under the instructor's guidance as they are introduced.

These examples are available to take away, along with the delegate's own work.

The comprehensive Student Guide supplied is fully indexed serving as a useful reference tool long after the course has finished. Delegates will also be able to access a free help-line with technical questions relating to topics covered on the course.


Availability

Course Enquiry