org.apache.xerces.impl.xs.opti

Class DefaultDocument

public class DefaultDocument extends NodeImpl implements Document

INTERNAL:

Usage of this class is not supported. It may be altered or removed at any time.

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
NodeadoptNode(Node source)
DOM Level 3
AttrcreateAttribute(String name)
AttrcreateAttributeNS(String namespaceURI, String qualifiedName)
CDATASectioncreateCDATASection(String data)
CommentcreateComment(String data)
DocumentFragmentcreateDocumentFragment()
ElementcreateElement(String tagName)
ElementcreateElementNS(String namespaceURI, String qualifiedName)
EntityReferencecreateEntityReference(String name)
ProcessingInstructioncreateProcessingInstruction(String target, String data)
TextcreateTextNode(String data)
DocumentTypegetDoctype()
ElementgetDocumentElement()
StringgetDocumentURI()
The location of the document or null if undefined.
DOMConfigurationgetDomConfig()
The configuration used when Document.normalizeDocument is invoked.
ElementgetElementById(String elementId)
NodeListgetElementsByTagName(String tagname)
NodeListgetElementsByTagNameNS(String namespaceURI, String localName)
DOMImplementationgetImplementation()
StringgetInputEncoding()
booleangetStrictErrorChecking()
An attribute specifying whether errors checking is enforced or not.
StringgetXmlEncoding()
public void setInputEncoding(String actualEncoding){ throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); }
booleangetXmlStandalone()
An attribute specifying, as part of the XML declaration, whether this document is standalone.
StringgetXmlVersion()
An attribute specifying, as part of the XML declaration, the version number of this document.
NodeimportNode(Node importedNode, boolean deep)
voidnormalizeDocument()
DOM Level 3
NoderenameNode(Node n, String namespaceURI, String name)
DOM Level 3
voidsetDocumentURI(String documentURI)
The location of the document or null if undefined.
voidsetStrictErrorChecking(boolean strictErrorChecking)
An attribute specifying whether errors checking is enforced or not.
voidsetXmlStandalone(boolean standalone)
An attribute specifying, as part of the XML declaration, whether this document is standalone.
voidsetXmlVersion(String version)
An attribute specifying, as part of the XML declaration, the version number of this document.

Constructor Detail

DefaultDocument

public DefaultDocument()

Method Detail

adoptNode

public Node adoptNode(Node source)
DOM Level 3

createAttribute

public Attr createAttribute(String name)

createAttributeNS

public Attr createAttributeNS(String namespaceURI, String qualifiedName)

createCDATASection

public CDATASection createCDATASection(String data)

createComment

public Comment createComment(String data)

createDocumentFragment

public DocumentFragment createDocumentFragment()

createElement

public Element createElement(String tagName)

createElementNS

public Element createElementNS(String namespaceURI, String qualifiedName)

createEntityReference

public EntityReference createEntityReference(String name)

createProcessingInstruction

public ProcessingInstruction createProcessingInstruction(String target, String data)

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 .

Throws: DOMException NOT_SUPPORTED_ERR: Raised if the version is set to a value that is not supported by this Document.

Since: DOM Level 3

importNode

public Node importNode(Node importedNode, boolean deep)

normalizeDocument

public void normalizeDocument()
DOM Level 3

renameNode

public Node renameNode(Node n, String namespaceURI, String name)
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)
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 .

Throws: 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-2005 Apache XML Project. All Rights Reserved.