org.apache.xerces.impl.xs.opti

Class DefaultDocument

Implemented Interfaces:
Document, Node
Known Direct Subclasses:
SchemaDOM

public class DefaultDocument
extends NodeImpl
implements Document

Version:
$Id: DefaultDocument.java,v 1.9 2005/05/02 22:00:52 mrglavas Exp $
Author:
Rahul Srivastava, Sun Microsystems Inc.

Constructor Summary

DefaultDocument()

Method Summary

Node
adoptNode(Node source)
DOM Level 3
Attr
createAttribute(String name)
Attr
createAttributeNS(String namespaceURI, String qualifiedName)
CDATASection
createCDATASection(String data)
Comment
createComment(String data)
DocumentFragment
createDocumentFragment()
Element
createElement(String tagName)
Element
createElementNS(String namespaceURI, String qualifiedName)
EntityReference
createEntityReference(String name)
ProcessingInstruction
createProcessingInstruction(String target, String data)
Text
createTextNode(String data)
DocumentType
getDoctype()
Element
getDocumentElement()
String
getDocumentURI()
The location of the document or null if undefined.
DOMConfiguration
getDomConfig()
The configuration used when Document.normalizeDocument is invoked.
Element
getElementById(String elementId)
NodeList
getElementsByTagName(String tagname)
NodeList
getElementsByTagNameNS(String namespaceURI, String localName)
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.
Node
importNode(Node importedNode, boolean deep)
void
normalizeDocument()
DOM Level 3
Node
renameNode(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 Node adoptNode(Node source)
            throws DOMException
DOM Level 3

createAttribute

public Attr createAttribute(String name)
            throws DOMException

createAttributeNS

public Attr createAttributeNS(String namespaceURI,
                              String qualifiedName)
            throws DOMException

createCDATASection

public CDATASection createCDATASection(String data)
            throws DOMException

createComment

public Comment createComment(String data)

createDocumentFragment

public DocumentFragment createDocumentFragment()

createElement

public Element createElement(String tagName)
            throws DOMException

createElementNS

public Element createElementNS(String namespaceURI,
                               String qualifiedName)
            throws DOMException

createEntityReference

public EntityReference createEntityReference(String name)
            throws DOMException

createProcessingInstruction

public ProcessingInstruction createProcessingInstruction(String target,
                                                         String data)
            throws DOMException

createTextNode

public Text createTextNode(String data)

getDoctype

public DocumentType getDoctype()

getDocumentElement

public Element getDocumentElement()

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.
Since:
DOM Level 3

getDomConfig

public DOMConfiguration getDomConfig()
The configuration used when Document.normalizeDocument is invoked.
Since:
DOM Level 3

getElementById

public Element getElementById(String elementId)

getElementsByTagName

public NodeList getElementsByTagName(String tagname)

getElementsByTagNameNS

public NodeList getElementsByTagNameNS(String namespaceURI,
                                       String localName)

getImplementation

public DOMImplementation getImplementation()

getInputEncoding

public String getInputEncoding()

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.
Since:
DOM Level 3

getXmlEncoding

public String getXmlEncoding()
public void setInputEncoding(String actualEncoding){ throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); }

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 .
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 .
Since:
DOM Level 3

importNode

public Node importNode(Node importedNode,
                       boolean deep)
            throws DOMException

normalizeDocument

public void normalizeDocument()
DOM Level 3

renameNode

public Node renameNode(Node n,
                       String namespaceURI,
                       String name)
            throws DOMException
DOM Level 3

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.
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.
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 .
Since:
DOM Level 3

setXmlVersion

public void setXmlVersion(String version)
            throws 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 .
Since:
DOM Level 3

Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.