# Class Document

java.lang.Object
nu.validator.saxtree.Node
nu.validator.saxtree.ParentNode
nu.validator.saxtree.Document

All Implemented Interfaces:
  `Locator2, Locator`

public final class Document extends ParentNode
A document.

Version:
  $Id$
Author:
  hsivonen

## Field Summary

### Fields inherited from class ParentNode

`endLocator`

## Constructor Summary

Constructors
Constructor
Description
`Document(Locator locator)`
The constructor.

## Method Summary

Modifier and Type
Method
Description
`NodeType`
`getNodeType()`
Return the node type.

### Methods inherited from class ParentNode

`appendChild, appendChildren, clearChildren, copyEndLocator, getFirstChild, getLastChild, insertBefore, insertBetween, setEndLocator`

### Methods inherited from class Node

`detach, getAttributes, getColumnNumber, getData, getEncoding, getLineNumber, getLocalName, getName, getNextSibling, getParentNode, getPrefixMappings, getPreviousSibling, getPublicId, getPublicIdentifier, getQName, getSystemId, getSystemIdentifier, getTarget, getUri, getXMLVersion`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Document

public Document(Locator locator)
The constructor.

Parameters:
  `locator` - the locator

## Method Details

### getNodeType

public NodeType getNodeType()
Description copied from class: `Node`
Return the node type.

Specified by:
  `getNodeType` in class `Node`
Returns:
  the node type
See Also:
  - `Node.getNodeType()`