XML Tutorials - Herong's Tutorial Notes
Dr. Herong Yang, Version 4.00

Validating an XML Document against the Specified DTD Document Type

This chapter provides tutorial notes and example codes on XML validation against DTD document types. Topics include using DOM API and SAX to write Java programs to validate an XML document against the specified DTD document type.

DOMValidator.java - Validating XML with DTD using DOM

SAXValidator.java - Validating XML with DTD using SAX

Conclusion:

  • The DOM API provided in JDK 1.4 can be used to validate an XML document against the specified DTD document type.
  • The SAX API provided in JDK 1.4 can be used to validate an XML document against the specified DTD document type.

Table of Contents

 About This Book

 Introduction of XML (eXtensible Markup Language)

 XML File Syntax

 XML File Browsers

 DOM (Document Object Model) Programming Interface

 SAX (Simple API for XML) Programming Interface

 DTD (Document Type Definition) Introduction

 Syntaxes of DTD Statements

Validating an XML Document against the Specified DTD Document Type

 XSD (XML Schema Definition) Introduction

 Syntaxes of XSD Statements

 Validating an XML Document against the Specified XML Schema

 XSL (Extensible Stylesheet Language) Introduction

 XSLT (XSL Transformations) Introduction

 Java Implementation of XSLT

 XPath (XML Path) Language

 XSLT Elements as Programming Statements

 Control and Generate XML Element in the Result

 References

 Printable Copy - PDF Version

Dr. Herong Yang, updated in 2009
Validating an XML Document against the Specified DTD Document Type