Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enhydra.xml.lazydom.html
Class LazyHTMLDocument  view LazyHTMLDocument download LazyHTMLDocument.java

java.lang.Object
  extended byorg.apache.xerces.dom.NodeImpl
      extended byorg.apache.xerces.dom.ChildNode
          extended byorg.apache.xerces.dom.ParentNode
              extended byorg.apache.xerces.dom.CoreDocumentImpl
                  extended byorg.apache.xerces.dom.DocumentImpl
                      extended byorg.enhydra.xml.lazydom.LazyDocument
                          extended byorg.enhydra.xml.lazydom.html.LazyHTMLDocument
All Implemented Interfaces:
java.lang.Cloneable, org.w3c.dom.Document, org.w3c.dom.events.DocumentEvent, org.w3c.dom.ranges.DocumentRange, org.w3c.dom.traversal.DocumentTraversal, org.w3c.dom.events.EventTarget, org.w3c.dom.html.HTMLDocument, org.enhydra.xml.lazydom.LazyNode, org.enhydra.xml.lazydom.LazyParent, org.w3c.dom.Node, org.w3c.dom.NodeList, org.enhydra.xml.io.PreFormattedTextDocument, java.io.Serializable

public class LazyHTMLDocument
extends org.enhydra.xml.lazydom.LazyDocument
implements org.w3c.dom.html.HTMLDocument

Implements an HTML document. Provides access to the top level element in the document, its body and title.

Several methods create new nodes of all basic types (comment, text, element, etc.). These methods create new nodes but do not place them in the document tree. The nodes may be placed in the document tree using Node.appendChild(org.w3c.dom.Node)>Node.appendChild(org.w3c.dom.Node) 55 or Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)>Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node) 55 , or they may be placed in some other document tree.

Note: <FRAMESET> documents are not supported at the moment, neither are direct document writing (open() 55 , write(java.lang.String) 55 ) and HTTP attribute methods (getURL() 55 , getCookie() 55 ).

Version:
$Revision$ $Date$

Nested Class Summary
 
Nested classes inherited from class org.apache.xerces.dom.DocumentImpl
 
Nested classes inherited from class org.apache.xerces.dom.CoreDocumentImpl
 
Field Summary
private  HTMLCollectionImpl _anchors
          Holds HTMLCollectionImpl object with live collection of all anchors in document.
private  HTMLCollectionImpl _applets
          Holds HTMLCollectionImpl object with live collection of all applets in document.
private static java.lang.Class[] _elemClassSigHTML
          Signature used to locate constructor of HTML element classes.
private static java.util.Hashtable _elementTypesHTML
          Holds names and classes of HTML element types.
private  HTMLCollectionImpl _forms
          Holds HTMLCollectionImpl object with live collection of all forms in document.
private  HTMLCollectionImpl _images
          Holds HTMLCollectionImpl object with live collection of all images in document.
private  HTMLCollectionImpl _links
          Holds HTMLCollectionImpl object with live collection of all links in document.
private  java.io.StringWriter _writer
          Holds string writer used by direct manipulation operation (open() 55 .
 
Fields inherited from class org.enhydra.xml.lazydom.LazyDocument
 
Fields inherited from class org.apache.xerces.dom.DocumentImpl
eventListeners, iterators, mutationEvents, ranges
 
Fields inherited from class org.apache.xerces.dom.CoreDocumentImpl
actualEncoding, allowGrammarAccess, changes, docElement, docType, encoding, errorChecking, fDocumentURI, identifiers, standalone, userData, version, xmlVersionChanged
 
Fields inherited from class org.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocument
 
Fields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
Fields inherited from class org.apache.xerces.dom.NodeImpl
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface org.enhydra.xml.lazydom.LazyNode
DOCUMENT_NODE_ID, NULL_NODE_ID
 
Constructor Summary
LazyHTMLDocument()
           
LazyHTMLDocument(org.enhydra.xml.lazydom.TemplateDOM templateDOM)
          LazyDOM: Constructor with TemplateDOM.
 
Method Summary
 org.w3c.dom.Node cloneNode(boolean deep)
          Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 void close()
          Closes a document stream opened by open() and forces rendering.
 org.w3c.dom.Attr createAttribute(java.lang.String name)
          Creates an Attribute having this Document as its OwnerDoc.
 org.enhydra.xml.lazydom.LazyElement createElement(int nodeId)
          Create a element from a template given its id.
 org.w3c.dom.Element createElement(org.enhydra.xml.lazydom.LazyElement template, java.lang.String tagName)
           
 org.w3c.dom.Element createElement(java.lang.String tagName)
          LazyDOM: standard createElement method, passes null template element.
 org.w3c.dom.Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
          Creates an element of the given qualified name and namespace URI.
private  org.w3c.dom.html.HTMLElement findBody(org.w3c.dom.Element html)
          Find a BODY or FRAMESET element.
 org.w3c.dom.html.HTMLCollection getAnchors()
          A collection of all the anchor (A ) elements in a document with a value for the name attribute.
 org.w3c.dom.html.HTMLCollection getApplets()
          A collection of all the OBJECT elements that include applets and APPLET ( deprecated ) elements in a document.
 org.w3c.dom.html.HTMLElement getBody()
          The element that contains the content for the document.
 java.lang.String getCookie()
          The cookies associated with this document.
private  org.w3c.dom.Node getDirectChildElement(java.lang.String name, org.w3c.dom.Node root)
          Find the direct child element of a node given its name.
 org.w3c.dom.Element getDocumentElement()
          This is a convenience attribute that allows direct access to the child node that is the root element of the document.
 java.lang.String getDomain()
          The domain name of the server that served the document, or null if the server cannot be identified by a domain name.
 org.w3c.dom.Element getElementById(java.lang.String elementId)
          Returns the Element whose ID is given by elementId.
private  org.w3c.dom.Element getElementById(java.lang.String elementId, org.w3c.dom.Node node)
          Recursive method retreives an element by its id attribute.
 org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
          Returns the (possibly empty) collection of elements whose name value is given by elementName .
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)
          Returns a NodeList of all the Elements with a given tag name in the order in which they are encountered in a preorder traversal of the Document tree.
 org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
          Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the Document tree.
 org.w3c.dom.html.HTMLCollection getForms()
          A collection of all the forms of a document.
 org.w3c.dom.html.HTMLElement getHead()
          Obtains the <HEAD> element in the document, creating one if does not exist before.
 org.w3c.dom.html.HTMLCollection getImages()
          A collection of all the IMG elements in a document.
 org.w3c.dom.DOMImplementation getImplementation()
          The DOMImplementation object that handles this document.
 org.w3c.dom.html.HTMLCollection getLinks()
          A collection of all AREA elements and anchor ( A ) elements in a document with a value for the href attribute.
 java.lang.String getReferrer()
          Returns the URI of the page that linked to this page.
 java.lang.String getTitle()
          The title of a document as specified by the TITLE element in the head of the document.
 java.lang.String getURL()
          The complete URI of the document.
 void open()
          Note.
private static void populateElementType(java.lang.String tagName, java.lang.String className)
           
private static void populateElementTypes()
          Called by the constructor to populate the element types list (see _elementTypesHTML 55 ).
 void setBody(org.w3c.dom.html.HTMLElement newBody)
           
 void setCookie(java.lang.String cookie)
           
 void setTitle(java.lang.String newTitle)
           
 void write(java.lang.String text)
          Write a string of text to a document stream opened by open() .
 void writeln(java.lang.String text)
          Write a string of text followed by a newline character to a document stream opened by open() .
 
Methods inherited from class org.enhydra.xml.lazydom.LazyDocument
appendChild, appendChildWhileExpanding, areChildrenExpanded, createAttribute, createAttributeNS, createAttributeNS, createCDATASection, createCDATASection, createComment, createComment, createDocumentType, createDocumentType, createDocumentType, createEntity, createEntity, createEntityReference, createEntityReference, createNotation, createNotation, createProcessingInstruction, createProcessingInstruction, createTemplateAttribute, createTemplateAttributeNS, createTemplateCDATASection, createTemplateComment, createTemplateDocumentType, createTemplateElement, createTemplateElementNS, createTemplateEntity, createTemplateEntityReference, createTemplateNotation, createTemplateProcessingInstruction, createTemplateTextNode, createTextNode, createTextNode, doExpandChildren, doExpandParent, enterExpansion, getChildNodes, getDoctype, getExpandedNode, getFirstChild, getLastChild, getNodeById, getNodeFromTemplate, getNodeId, getPreFormatOutputOptions, getTemplateDocument, getTemplateNode, getTemplateNode, hasChildNodes, insertBefore, isDocTypeExpanded, isParentExpanded, isTemplateNode, leaveExpansion, makeTemplateNode, normalize, removeChild, replaceChild, setChildrenExpanded, setNodeValue, setParentExpanded, setParentWhileExpanding, setPreFormatOutputOptions, templateClone
 
Methods inherited from class org.apache.xerces.dom.DocumentImpl
addEventListener, copyEventListeners, createEvent, createNodeIterator, createNodeIterator, createRange, createTreeWalker, createTreeWalker, dispatchAggregateEvents, dispatchAggregateEvents, dispatchEvent, dispatchEventToSubtree, getEventListeners, removeEventListener, saveEnclosingAttr, setEventListeners
 
Methods inherited from class org.apache.xerces.dom.CoreDocumentImpl
abort, adoptNode, changed, changes, checkDOMNSErr, checkNamespaceWF, checkQName, clearIdentifiers, clone, cloneNode, createAttributeNS, createDocumentFragment, createElementDefinition, createElementNS, getAsync, getBaseURI, getDocumentURI, getDomConfig, getErrorChecking, getFeature, getIdentifier, getIdentifiers, getInputEncoding, getNodeName, getNodeNumber, getNodeNumber, getNodeType, getOwnerDocument, getStrictErrorChecking, getTextContent, getUserData, getUserData, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, isKidOK, isValidQName, isXMLName, load, loadXML, normalizeDocument, putIdentifier, removeIdentifier, renameNode, saveXML, setAsync, setDocumentURI, setErrorChecking, setInputEncoding, setStrictErrorChecking, setTextContent, setUserData, setUserData, setXmlEncoding, setXmlStandalone, setXmlVersion
 
Methods inherited from class org.apache.xerces.dom.ParentNode
getChildNodesUnoptimized, getLength, isEqualNode, item, setReadOnly, synchronizeChildren
 
Methods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, compareDocumentPosition, compareTreePosition, dispatchEvent, getAttributes, getContainer, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getUserData, getUserData, hasAttributes, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setPrefix, setUserData, setUserData, synchronizeData, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Document
createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, importNode
 
Methods inherited from interface org.w3c.dom.Node
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Field Detail

_anchors

private HTMLCollectionImpl _anchors
Holds HTMLCollectionImpl object with live collection of all anchors in document. This reference is on demand only once.


_forms

private HTMLCollectionImpl _forms
Holds HTMLCollectionImpl object with live collection of all forms in document. This reference is on demand only once.


_images

private HTMLCollectionImpl _images
Holds HTMLCollectionImpl object with live collection of all images in document. This reference is on demand only once.


_links

private HTMLCollectionImpl _links
Holds HTMLCollectionImpl object with live collection of all links in document. This reference is on demand only once.


_applets

private HTMLCollectionImpl _applets
Holds HTMLCollectionImpl object with live collection of all applets in document. This reference is on demand only once.


_writer

private java.io.StringWriter _writer
Holds string writer used by direct manipulation operation (open() 55 . write(java.lang.String) 55 , etc) to write new contents into the document and parse that text into a document tree.


_elementTypesHTML

private static java.util.Hashtable _elementTypesHTML
Holds names and classes of HTML element types. When an element with a particular tag name is created, the matching java.lang.Class is used to create the element object. For example, <A> matches HTMLAnchorElementImpl. This static table is shared across all HTML documents.

See Also:
createElement(org.enhydra.xml.lazydom.LazyElement, java.lang.String) 55

_elemClassSigHTML

private static final java.lang.Class[] _elemClassSigHTML
Signature used to locate constructor of HTML element classes. This static array is shared across all HTML documents.

See Also:
createElement(org.enhydra.xml.lazydom.LazyElement, java.lang.String) 55
Constructor Detail

LazyHTMLDocument

public LazyHTMLDocument()

LazyHTMLDocument

public LazyHTMLDocument(org.enhydra.xml.lazydom.TemplateDOM templateDOM)
LazyDOM: Constructor with TemplateDOM.

Method Detail

getImplementation

public org.w3c.dom.DOMImplementation getImplementation()
Description copied from interface: org.w3c.dom.Document
The DOMImplementation object that handles this document. A DOM application may use objects from multiple implementations.

Specified by:
getImplementation in interface org.w3c.dom.Document

getDirectChildElement

private org.w3c.dom.Node getDirectChildElement(java.lang.String name,
                                               org.w3c.dom.Node root)
Find the direct child element of a node given its name.


getDocumentElement

public org.w3c.dom.Element getDocumentElement()
Description copied from interface: org.w3c.dom.Document
This is a convenience attribute that allows direct access to the child node that is the root element of the document. For HTML documents, this is the element with the tagName "HTML".

Specified by:
getDocumentElement in interface org.w3c.dom.Document

getHead

public org.w3c.dom.html.HTMLElement getHead()
Obtains the <HEAD> element in the document, creating one if does not exist before. The <HEAD> element is the first element in the <HTML> in the document. The <HTML> element is obtained by calling getDocumentElement() 55 . If the element does not exist, one is created.

Called by getTitle() 55 , setTitle(java.lang.String) 55 , getBody() 55 and setBody(org.w3c.dom.html.HTMLElement) 55 to assure the document has the <HEAD> element correctly placed.


getTitle

public java.lang.String getTitle()
Description copied from interface: org.w3c.dom.html.HTMLDocument
The title of a document as specified by the TITLE element in the head of the document.

Specified by:
getTitle in interface org.w3c.dom.html.HTMLDocument

setTitle

public void setTitle(java.lang.String newTitle)
Specified by:
setTitle in interface org.w3c.dom.html.HTMLDocument

findBody

private org.w3c.dom.html.HTMLElement findBody(org.w3c.dom.Element html)
Find a BODY or FRAMESET element.


getBody

public org.w3c.dom.html.HTMLElement getBody()
Description copied from interface: org.w3c.dom.html.HTMLDocument
The element that contains the content for the document. In documents with BODY contents, returns the BODY element. In frameset documents, this returns the outermost FRAMESET element.

Specified by:
getBody in interface org.w3c.dom.html.HTMLDocument

setBody

public void setBody(org.w3c.dom.html.HTMLElement newBody)
Specified by:
setBody in interface org.w3c.dom.html.HTMLDocument

getElementById

public org.w3c.dom.Element getElementById(java.lang.String elementId)
Description copied from interface: org.w3c.dom.Document
Returns the Element whose ID is given by elementId. If no such element exists, returns null. Behavior is not defined if more than one element has this ID. The DOM implementation must have information that says which attributes are of type ID. Attributes with the name "ID" are not of type ID unless so defined. Implementations that do not know whether attributes are of type ID or not are expected to return null.

Specified by:
getElementById in interface org.w3c.dom.Document

getElementsByName

public org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
Description copied from interface: org.w3c.dom.html.HTMLDocument
Returns the (possibly empty) collection of elements whose name value is given by elementName .

Specified by:
getElementsByName in interface org.w3c.dom.html.HTMLDocument

getElementsByTagName

public final org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)
Description copied from interface: org.w3c.dom.Document
Returns a NodeList of all the Elements with a given tag name in the order in which they are encountered in a preorder traversal of the Document tree.

Specified by:
getElementsByTagName in interface org.w3c.dom.Document

getElementsByTagNameNS

public final org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
                                                         java.lang.String localName)
Description copied from interface: org.w3c.dom.Document
Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the Document tree.

Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Document

createElementNS

public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
                                           java.lang.String qualifiedName)
Description copied from interface: org.w3c.dom.Document
Creates an element of the given qualified name and namespace URI. HTML-only DOM implementations do not need to implement this method.

Specified by:
createElementNS in interface org.w3c.dom.Document

createElement

public org.w3c.dom.Element createElement(org.enhydra.xml.lazydom.LazyElement template,
                                         java.lang.String tagName)
                                  throws org.w3c.dom.DOMException

createAttribute

public org.w3c.dom.Attr createAttribute(java.lang.String name)
                                 throws org.w3c.dom.DOMException
Creates an Attribute having this Document as its OwnerDoc. Overrides DocumentImpl#createAttribute and returns and attribute whose name is lower case.

Specified by:
createAttribute in interface org.w3c.dom.Document

getReferrer

public java.lang.String getReferrer()
Description copied from interface: org.w3c.dom.html.HTMLDocument
Returns the URI of the page that linked to this page. The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark).

Specified by:
getReferrer in interface org.w3c.dom.html.HTMLDocument

getDomain

public java.lang.String getDomain()
Description copied from interface: org.w3c.dom.html.HTMLDocument
The domain name of the server that served the document, or null if the server cannot be identified by a domain name.

Specified by:
getDomain in interface org.w3c.dom.html.HTMLDocument

getURL

public java.lang.String getURL()
Description copied from interface: org.w3c.dom.html.HTMLDocument
The complete URI of the document.

Specified by:
getURL in interface org.w3c.dom.html.HTMLDocument

getCookie

public java.lang.String getCookie()
Description copied from interface: org.w3c.dom.html.HTMLDocument
The cookies associated with this document. If there are none, the value is an empty string. Otherwise, the value is a string: a semicolon-delimited list of "name, value" pairs for all the cookies associated with the page. For example, name=value;expires=date .

Specified by:
getCookie in interface org.w3c.dom.html.HTMLDocument

setCookie

public void setCookie(java.lang.String cookie)
Specified by:
setCookie in interface org.w3c.dom.html.HTMLDocument

getImages

public org.w3c.dom.html.HTMLCollection getImages()
Description copied from interface: org.w3c.dom.html.HTMLDocument
A collection of all the IMG elements in a document. The behavior is limited to IMG elements for backwards compatibility.

Specified by:
getImages in interface org.w3c.dom.html.HTMLDocument

getApplets

public org.w3c.dom.html.HTMLCollection getApplets()
Description copied from interface: org.w3c.dom.html.HTMLDocument
A collection of all the OBJECT elements that include applets and APPLET ( deprecated ) elements in a document.

Specified by:
getApplets in interface org.w3c.dom.html.HTMLDocument

getLinks

public org.w3c.dom.html.HTMLCollection getLinks()
Description copied from interface: org.w3c.dom.html.HTMLDocument
A collection of all AREA elements and anchor ( A ) elements in a document with a value for the href attribute.

Specified by:
getLinks in interface org.w3c.dom.html.HTMLDocument

getForms

public org.w3c.dom.html.HTMLCollection getForms()
Description copied from interface: org.w3c.dom.html.HTMLDocument
A collection of all the forms of a document.

Specified by:
getForms in interface org.w3c.dom.html.HTMLDocument

getAnchors

public org.w3c.dom.html.HTMLCollection getAnchors()
Description copied from interface: org.w3c.dom.html.HTMLDocument
A collection of all the anchor (A ) elements in a document with a value for the name attribute. Note. For reasons of backwards compatibility, the returned set of anchors only contains those anchors created with the name attribute, not those created with the id attribute.

Specified by:
getAnchors in interface org.w3c.dom.html.HTMLDocument

open

public void open()
Description copied from interface: org.w3c.dom.html.HTMLDocument
Note. This method and the ones following allow a user to add to or replace the structure model of a document using strings of unparsed HTML. At the time of writing alternate methods for providing similar functionality for both HTML and XML documents were being considered. The following methods may be deprecated at some point in the future in favor of a more general-purpose mechanism.
Open a document stream for writing. If a document exists in the target, this method clears it.

Specified by:
open in interface org.w3c.dom.html.HTMLDocument

close

public void close()
Description copied from interface: org.w3c.dom.html.HTMLDocument
Closes a document stream opened by open() and forces rendering.

Specified by:
close in interface org.w3c.dom.html.HTMLDocument

write

public void write(java.lang.String text)
Description copied from interface: org.w3c.dom.html.HTMLDocument
Write a string of text to a document stream opened by open() . The text is parsed into the document's structure model.

Specified by:
write in interface org.w3c.dom.html.HTMLDocument

writeln

public void writeln(java.lang.String text)
Description copied from interface: org.w3c.dom.html.HTMLDocument
Write a string of text followed by a newline character to a document stream opened by open() . The text is parsed into the document's structure model.

Specified by:
writeln in interface org.w3c.dom.html.HTMLDocument

cloneNode

public org.w3c.dom.Node cloneNode(boolean deep)
Description copied from interface: org.w3c.dom.Node
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent; ( parentNode is null.).
Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning an Attribute directly, as opposed to be cloned as part of an Element cloning operation, returns a specified attribute ( specified is true). Cloning any other type of node simply returns a copy of this node.
Note that cloning an immutable subtree results in a mutable copy, but the children of an EntityReference clone are readonly . In addition, clones of unspecified Attr nodes are specified. And, cloning Document, DocumentType, Entity, and Notation nodes is implementation dependent.

Specified by:
cloneNode in interface org.w3c.dom.Node

getElementById

private org.w3c.dom.Element getElementById(java.lang.String elementId,
                                           org.w3c.dom.Node node)
Recursive method retreives an element by its id attribute. This is LazyDOM aware and will not expand elements during search.


populateElementTypes

private static void populateElementTypes()
Called by the constructor to populate the element types list (see _elementTypesHTML 55 ). Will be called multiple times but populate the list only the first time. Replacement for static constructor.


populateElementType

private static void populateElementType(java.lang.String tagName,
                                        java.lang.String className)

createElement

public org.w3c.dom.Element createElement(java.lang.String tagName)
                                  throws org.w3c.dom.DOMException
LazyDOM: standard createElement method, passes null template element.

Specified by:
createElement in interface org.w3c.dom.Document

createElement

public org.enhydra.xml.lazydom.LazyElement createElement(int nodeId)
                                                  throws org.w3c.dom.DOMException
Description copied from class: org.enhydra.xml.lazydom.LazyDocument
Create a element from a template given its id.