Downloading and installing JDK

This section describes a tutorial example on how to install JDK (Java Development Kit) to use JAXP (Java API for XML Processing) or other Java based API to process XML documents and apply XML schemas.

To use JAXP (Java API for XML Processing) or other Java based API, you need to have a copy of JDK (Java Development Kit) installed on your machine. Here is what I did on my macOS computer to download and install JDK 13, which is the current version in 2019.

1. Go to Oracle Java SE download website at

2. Click "Download" next to "Java Platform (JDK) 13".

3. Click "jdk-13_osx-x64.bin.tar.gz" from the download list. It will be saved to your "Downloads" directory automatically.

4. Start a Terminal window and run commands below to install it.

herong$ cd ~/Downloads

herong$ gunzip jdk-13_osx-x64.bin.tar.gz

herong$ tar -xf jdk-13_osx-64.bin.tar

herong$ sudo mv jdk-13.jdk/ /Library/Java/JavaVirtualMachines/

herong$ java -version
java version "13" 2019-09-17
Java(TM) SE Runtime Environment (build 13+33)
Java HotSpot(TM) 64-Bit Server VM (build 13+33, mixed mode, sharing)

Another way to install JDK is to using the *.dmg file, which can integrate better with Safari and other Applications.

If you are using Windows or Linux computers, you can follow simiar steps to download and install JDK 13.

Table of Contents

 About This Book

 Introduction to XML Schema

 XML Editor and Schema Processor - XMLPad

Java API for XML Processing - JAXP

 What Is JAXP?

Downloading and installing JDK

 Compiling and Running Java Programs

 XML File DOM Parser -

 JAXP API Module (java.xml.jmod) - Packages and Classes

 JAXP - XML Schema (XSD) Validation

 Xerces2 Java Parser - Java API of XML Parsers

 Using Xerces2 Java APIs

 XML Schema Language - Basics

 Introduction of XSD Built-in Datatypes

 "string" and Its Derived Datatypes

 "decimal" and Its Derived Datatypes

 "dateTime" and Its Related Datatypes

 Miscellaneous Built-in Datatypes

 Facets, Constraining Facets and Restriction Datatypes

 "simpleType" - Defining Your Own Simple Datatypes

 Complex Element Declaration

 Identity-Constraints: unique, key and keyref

 Assertion as Custom Validation Rules

 XML Schema Location and Namespace in XML Documents

 Overriding Element Types in XML Documents

 Linking Multiple Schema Documents Together


 Archived Tutorials


 Full Version in PDF/EPUB