DOM Specifications and DOM Node Interface

This section describes the DOM specification. The Core module in DOM Level 1, 2 and 3 specifications is for XML files. A tree of nodes is used to represent an XML file. Each node represents a unit of information in the XML file. All nodes are sharing the Node interface.

Currently, DOM has 4 levels of specifications:

Based the Core module of DOM Level 1 specification, an XML file is represented with a tree structure, called "document". Each node in the tree is a Node object, which represents a unit of information in the XML file.

A Node object is actually an instance of classes that implemented the Node interface, which contains these methods:

DOM Level 1 Core module specifies these nodes types, each of them could be implemented as separated class:

 2 ATTRIBUTE_NODE
 4 CDATA_SECTION_NODE
 8 COMMENT_NODE
11 DOCUMENT_FRAGMENT_NODE
 9 DOCUMENT_NODE
10 DOCUMENT_TYPE_NODE
 1 ELEMENT_NODE
 6 ENTITY_NODE
 5 ENTITY_REFERENCE_NODE
12 NOTATION_NODE
 7 PROCESSING_INSTRUCTION_NODE
 3 TEXT_NODE

Last update: 2014.

Table of Contents

 About This Book

 Introduction of XML (eXtensible Markup Language)

 XML File Syntax

 XML File Browsers

DOM (Document Object Model) Programming Interface

 What Is DOM (Document Object Model)?

 Using DOM Implementation Provided in JDK 1.8

DOM Specifications and DOM Node Interface

 DOMBrowser.java - DOM Interface Java Example

 XML DOM Node Tree Example

 Building a New DOM Document Object

 Converting DOM Document Objects to XML Files

 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 XML Documents Against Specified XML Schemas

 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

 XML Notepad - XML Editor

 XML Tools Plugin for Notepad++

 XML 1.1 Changes and Parsing Examples

 Outdated Tutorials

 References

 PDF Printing Version