org.apache.xerces.impl.xs.opti

Class DefaultDocument

Implemented Interfaces:
org.w3c.dom.Document, org.w3c.dom.Node
Known Direct Subclasses:
SchemaDOM

public class DefaultDocument
extends NodeImpl
implements org.w3c.dom.Document

Version:
$Id: DefaultDocument.java 320295 2005-05-02 22:02:22Z mrglavas $
Author:
Rahul Srivastava, Sun Microsystems Inc.

Fields inherited from interface org.w3c.dom.Node

ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE

Constructor Summary

DefaultDocument()

Method Summary

org.w3c.dom.Node
adoptNode(org.w3c.dom.Node source)
DOM Level 3
org.w3c.dom.Attr
createAttribute(String name)
org.w3c.dom.Attr
createAttributeNS(String namespaceURI, String qualifiedName)
org.w3c.dom.CDATASection
createCDATASection(String data)
org.w3c.dom.Comment
createComment(String data)
org.w3c.dom.DocumentFragment
createDocumentFragment()
org.w3c.dom.Element
createElement(String tagName)
org.w3c.dom.Element
createElementNS(String namespaceURI, String qualifiedName)
org.w3c.dom.EntityReference
createEntityReference(String name)
org.w3c.dom.ProcessingInstruction
createProcessingInstruction(String target, String data)
org.w3c.dom.Text
createTextNode(String data)
org.w3c.dom.DocumentType
getDoctype()
org.w3c.dom.Element
getDocumentElement()
String
getDocumentURI()
The location of the document or null if undefined.
org.w3c.dom.DOMConfiguration
getDomConfig()
The configuration used when Document.normalizeDocument is invoked.
org.w3c.dom.Element
getElementById(String elementId)
org.w3c.dom.NodeList
getElementsByTagName(String tagname)
org.w3c.dom.NodeList
getElementsByTagNameNS(String namespaceURI, String localName)
org.w3c.dom.DOMImplementation
getImplementation()
String
getInputEncoding()
boolean
getStrictErrorChecking()
An attribute specifying whether errors checking is enforced or not.
String
getXmlEncoding()
public void setInputEncoding(String actualEncoding){ throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); }
boolean
getXmlStandalone()
An attribute specifying, as part of the XML declaration, whether this document is standalone.
String
getXmlVersion()
An attribute specifying, as part of the XML declaration, the version number of this document.
org.w3c.dom.Node
importNode(org.w3c.dom.Node importedNode, boolean deep)
void
normalizeDocument()
DOM Level 3
org.w3c.dom.Node
renameNode(org.w3c.dom.Node n, String namespaceURI, String name)
DOM Level 3
void
setDocumentURI(String documentURI)
The location of the document or null if undefined.
void
setStrictErrorChecking(boolean strictErrorChecking)
An attribute specifying whether errors checking is enforced or not.
void
setXmlStandalone(boolean standalone)
An attribute specifying, as part of the XML declaration, whether this document is standalone.
void
setXmlVersion(String version)
An attribute specifying, as part of the XML declaration, the version number of this document.

Methods inherited from class org.apache.xerces.impl.xs.opti.NodeImpl

getLocalName, getNamespaceURI, getNodeName, getNodeType, getPrefix, getReadOnly, setReadOnly

Methods inherited from class org.apache.xerces.impl.xs.opti.DefaultNode

appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData

Constructor Details

DefaultDocument

public DefaultDocument()

Method Details

adoptNode

public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source)
            throws org.w3c.dom.DOMException
DOM Level 3
Specified by:
adoptNode in interface org.w3c.dom.Document

createAttribute

public org.w3c.dom.Attr createAttribute(String name)
            throws org.w3c.dom.DOMException
Specified by:
createAttribute in interface org.w3c.dom.Document

createAttributeNS

public org.w3c.dom.Attr createAttributeNS(String namespaceURI,
                                          String qualifiedName)
            throws org.w3c.dom.DOMException
Specified by:
createAttributeNS in interface org.w3c.dom.Document

createCDATASection

public org.w3c.dom.CDATASection createCDATASection(String data)
            throws org.w3c.dom.DOMException
Specified by:
createCDATASection in interface org.w3c.dom.Document

createComment

public org.w3c.dom.Comment createComment(String data)
Specified by:
createComment in interface org.w3c.dom.Document

createDocumentFragment

public org.w3c.dom.DocumentFragment createDocumentFragment()
Specified by:
createDocumentFragment in interface org.w3c.dom.Document

createElement

public org.w3c.dom.Element createElement(String tagName)
            throws org.w3c.dom.DOMException
Specified by:
createElement in interface org.w3c.dom.Document

createElementNS

public org.w3c.dom.Element createElementNS(String namespaceURI,
                                           String qualifiedName)
            throws org.w3c.dom.DOMException
Specified by:
createElementNS in interface org.w3c.dom.Document

createEntityReference

public org.w3c.dom.EntityReference createEntityReference(String name)
            throws org.w3c.dom.DOMException
Specified by:
createEntityReference in interface org.w3c.dom.Document

createProcessingInstruction

public org.w3c.dom.ProcessingInstruction createProcessingInstruction(String target,
                                                                     String data)
            throws org.w3c.dom.DOMException
Specified by:
createProcessingInstruction in interface org.w3c.dom.Document

createTextNode

public org.w3c.dom.Text createTextNode(String data)
Specified by:
createTextNode in interface org.w3c.dom.Document

getDoctype

public org.w3c.dom.DocumentType getDoctype()
Specified by:
getDoctype in interface org.w3c.dom.Document

getDocumentElement

public org.w3c.dom.Element getDocumentElement()
Specified by:
getDocumentElement in interface org.w3c.dom.Document

getDocumentURI

public String getDocumentURI()
The location of the document or null if undefined.
Beware that when the Document supports the feature "HTML" , the href attribute of the HTML BASE element takes precedence over this attribute.
Specified by:
getDocumentURI in interface org.w3c.dom.Document
Since:
DOM Level 3

getDomConfig

public org.w3c.dom.DOMConfiguration getDomConfig()
The configuration used when Document.normalizeDocument is invoked.
Specified by:
getDomConfig in interface org.w3c.dom.Document
Since:
DOM Level 3

getElementById

public org.w3c.dom.Element getElementById(String elementId)
Specified by:
getElementById in interface org.w3c.dom.Document

getElementsByTagName

public org.w3c.dom.NodeList getElementsByTagName(String tagname)
Specified by:
getElementsByTagName in interface org.w3c.dom.Document

getElementsByTagNameNS

public org.w3c.dom.NodeList getElementsByTagNameNS(String namespaceURI,
                                                   String localName)
Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Document

getImplementation

public org.w3c.dom.DOMImplementation getImplementation()
Specified by:
getImplementation in interface org.w3c.dom.Document

getInputEncoding

public String getInputEncoding()
Specified by:
getInputEncoding in interface org.w3c.dom.Document

getStrictErrorChecking

public boolean getStrictErrorChecking()
An attribute specifying whether errors checking is enforced or not. When set to false, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise any DOMException. In case of error, the behavior is undefined. This attribute is true by defaults.
Specified by:
getStrictErrorChecking in interface org.w3c.dom.Document
Since:
DOM Level 3

getXmlEncoding

public String getXmlEncoding()
public void setInputEncoding(String actualEncoding){ throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); }
Specified by:
getXmlEncoding in interface org.w3c.dom.Document

getXmlStandalone

public boolean getXmlStandalone()
An attribute specifying, as part of the XML declaration, whether this document is standalone.
This attribute represents the property [standalone] defined in .
Specified by:
getXmlStandalone in interface org.w3c.dom.Document
Since:
DOM Level 3

getXmlVersion

public String getXmlVersion()
An attribute specifying, as part of the XML declaration, the version number of this document. This is null when unspecified.
This attribute represents the property [version] defined in .
Specified by:
getXmlVersion in interface org.w3c.dom.Document
Since:
DOM Level 3

importNode

public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode,
                                   boolean deep)
            throws org.w3c.dom.DOMException
Specified by:
importNode in interface org.w3c.dom.Document

normalizeDocument

public void normalizeDocument()
DOM Level 3
Specified by:
normalizeDocument in interface org.w3c.dom.Document

renameNode

public org.w3c.dom.Node renameNode(org.w3c.dom.Node n,
                                   String namespaceURI,
                                   String name)
            throws org.w3c.dom.DOMException
DOM Level 3
Specified by:
renameNode in interface org.w3c.dom.Document

setDocumentURI

public void setDocumentURI(String documentURI)
The location of the document or null if undefined.
Beware that when the Document supports the feature "HTML" , the href attribute of the HTML BASE element takes precedence over this attribute.
Specified by:
setDocumentURI in interface org.w3c.dom.Document
Since:
DOM Level 3

setStrictErrorChecking

public void setStrictErrorChecking(boolean strictErrorChecking)
An attribute specifying whether errors checking is enforced or not. When set to false, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise any DOMException. In case of error, the behavior is undefined. This attribute is true by defaults.
Specified by:
setStrictErrorChecking in interface org.w3c.dom.Document
Since:
DOM Level 3

setXmlStandalone

public void setXmlStandalone(boolean standalone)
An attribute specifying, as part of the XML declaration, whether this document is standalone.
This attribute represents the property [standalone] defined in .
Specified by:
setXmlStandalone in interface org.w3c.dom.Document
Since:
DOM Level 3

setXmlVersion

public void setXmlVersion(String version)
            throws org.w3c.dom.DOMException
An attribute specifying, as part of the XML declaration, the version number of this document. This is null when unspecified.
This attribute represents the property [version] defined in .
Specified by:
setXmlVersion in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException - NOT_SUPPORTED_ERR: Raised if the version is set to a value that is not supported by this Document.
Since:
DOM Level 3

Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.