Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 8.1 API Reference

## weblogic.apache.html.dom
Class HTMLDocumentImpl

    java.lang.Object
      |
      +--weblogic.apache.xerces.dom.NodeImpl
            |
            +--weblogic.apache.xerces.dom.ChildNode
                  |
                  +--weblogic.apache.xerces.dom.ParentNode
                        |
                        +--weblogic.apache.xerces.dom.CoreDocumentImpl
                              |
                              +--weblogic.apache.xerces.dom.DocumentImpl
                                    |
                                    +--weblogic.apache.html.dom.HTMLDocumentImpl

public class HTMLDocumentImpl
extends DocumentImpl
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)` or `Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)`, 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()`, `write(java.lang.String)`) and HTTP attribute methods (`getURL()`, `getCookie()`).

See Also:
  `HTMLDocument`, Serialized Form

Fields inherited from class weblogic.apache.xerces.dom.DocumentImpl
`eventListeners, iterators, mutationEvents, ranges`

Fields inherited from class weblogic.apache.xerces.dom.CoreDocumentImpl
`actualEncoding, allowGrammarAccess, CDATA, changes, COMMENTS, DEFAULTS, docElement, docType, domNormalizer, DTNORMALIZATION, encoding, ENTITIES, errorChecking, fConfiguration, fDocumentURI, features, fEntityResolver, fErrorHandlerWrapper, fGrammar, fSymbolTable, identifiers, NAMESPACES, SPLITCDATA, standalone, userData, VALIDATION, version`

Fields inherited from class weblogic.apache.xerces.dom.ParentNode
`firstChild, fNodeListCache, ownerDocument`

Fields inherited from class weblogic.apache.xerces.dom.ChildNode
`nextSibling, previousSibling`

Fields inherited from class weblogic.apache.xerces.dom.NodeImpl
`ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, IDATTRIBUTE, IGNORABLEWS, 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, UNNORMALIZED`

Constructor Summary
`HTMLDocumentImpl()`

Method Summary
`org.w3c.dom.Node` | `cloneNode(boolean deep)`
`void` | `close()`
`org.w3c.dom.Attr` | `createAttribute(java.lang.String name)` Creates an Attribute having this Document as its OwnerDoc.
`org.w3c.dom.Element` | `createElement(java.lang.String tagName)`
`org.w3c.dom.Element` | `createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)`
`org.w3c.dom.Element` | `createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String localpart)` Xerces-specific constructor.
`org.w3c.dom.html.HTMLCollection` | `getAnchors()`
`org.w3c.dom.html.HTMLCollection` | `getApplets()`
`org.w3c.dom.html.HTMLElement` | `getBody()`
`java.lang.String` | `getCookie()`
`org.w3c.dom.Element` | `getDocumentElement()`
`java.lang.String` | `getDomain()`
`org.w3c.dom.Element` | `getElementById(java.lang.String elementId)`
`org.w3c.dom.NodeList` | `getElementsByName(java.lang.String elementName)`
`org.w3c.dom.NodeList` | `getElementsByTagName(java.lang.String tagName)`
`org.w3c.dom.NodeList` | `getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)`
`org.w3c.dom.html.HTMLCollection` | `getForms()`
`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()`
`org.w3c.dom.html.HTMLCollection` | `getLinks()`
`java.lang.String` | `getReferrer()`
`java.lang.String` | `getTitle()`
`java.lang.String` | `getURL()`
`void` | `open()`
`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)`
`void` | `writeln(java.lang.String text)`

Methods inherited from class weblogic.apache.xerces.dom.DocumentImpl
`addEventListener, copyEventListeners, createEvent, createNodeIterator, createNodeIterator, createRange, createTreeWalker, createTreeWalker, dispatchAggregateEvents, dispatchAggregateEvents, dispatchEvent, dispatchEventToSubtree, getEventListeners, getImplementation, removeEventListener, saveEnclosingAttr, setEventListeners`

Methods inherited from class weblogic.apache.xerces.dom.CoreDocumentImpl
`abort, adoptNode, canSetNormalizationFeature, changed, changes, clone, cloneNode, copyConfigurationProperties, createAttributeNS, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElementDefinition, createEntity, createEntityReference, createNotation, createProcessingInstruction, createTextNode, finalize, getActualEncoding, getAsync, getBaseURI, getDoctype, getDocumentURI, getEncoding, getErrorChecking, getErrorHandler, getIdentifier, getIdentifiers, getNodeName, getNodeType, getNormalizationFeature, getOwnerDocument, getStandalone, getStrictErrorChecking, getTextContent, getUserData, getUserData, getVersion, importNode, insertBefore, isKidOK, isNormalizeDocRequired, isXMLName, load, loadXML, normalizeDocument, putIdentifier, removeChild, removeIdentifier, renameNode, replaceChild, saveXML, setActualEncoding, setAsync, setDocumentURI, setEncoding, setErrorChecking, setErrorHandler, setNormalizationFeature, setStandalone, setStrictErrorChecking, setTextContent, setUserData, setUserData, setVersion`

Methods inherited from class weblogic.apache.xerces.dom.ParentNode
`getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, hasChildNodes, isEqualNode, item, normalize, setReadOnly, synchronizeChildren`

Methods inherited from class weblogic.apache.xerces.dom.ChildNode
`getNextSibling, getParentNode, getPreviousSibling`

Methods inherited from class weblogic.apache.xerces.dom.NodeImpl
`addEventListener, appendChild, compareTreePosition, dispatchEvent, getAttributes, getInterface, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getUserData, getUserData, hasAttributes, isDefaultNamespace, isSameNode, isSupported, lookupNamespacePrefix, lookupNamespaceURI, needsSyncChildren, removeEventListener, setNodeValue, setPrefix, setUserData, setUserData, synchronizeData, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### HTMLDocumentImpl

    public HTMLDocumentImpl()

Method Detail

### getDocumentElement

    public org.w3c.dom.Element getDocumentElement()

  Overrides:
    getDocumentElement in class CoreDocumentImpl

### 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()`. If the element does not exist, one is created.

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

  Returns:
    The <HEAD> element

### getTitle

    public java.lang.String getTitle()

  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

### getBody

    public org.w3c.dom.html.HTMLElement getBody()

  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)

  Overrides:
    getElementById in class CoreDocumentImpl

### getElementsByName

    public org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)

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

### getElementsByTagName

    public final org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)

  Overrides:
    getElementsByTagName in class CoreDocumentImpl

### getElementsByTagNameNS

    public final org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
                                                             java.lang.String localName)

  Overrides:
    getElementsByTagNameNS in class CoreDocumentImpl

### createElementNS

    public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
                                               java.lang.String qualifiedName,
                                               java.lang.String localpart)
                                        throws org.w3c.dom.DOMException

  Xerces-specific constructor. "localName" is passed in, so we don't need to create a new String for it.

  Parameters:
    `namespaceURI` - The namespace URI of the element to create.
    `qualifiedName` - The qualified name of the element type to instantiate.
    `localName` - The local name of the element to instantiate.
  Returns:
    Element A new Element object with the following attributes:
  Throws:
    org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.
  Overrides:
    createElementNS in class CoreDocumentImpl

### createElementNS

    public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
                                               java.lang.String qualifiedName)

  Overrides:
    createElementNS in class CoreDocumentImpl

### createElement

    public org.w3c.dom.Element createElement(java.lang.String tagName)
                                      throws org.w3c.dom.DOMException

  Overrides:
    createElement in class CoreDocumentImpl

### 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 `CoreDocumentImpl.createAttribute(java.lang.String)` and returns and attribute whose name is lower case.

  Parameters:
    `name` - The name of the attribute
  Returns:
    An attribute whose name is all lower case
  Throws:
    DOMException(INVALID_NAME_ERR) - if the attribute name is not acceptable
  Overrides:
    createAttribute in class CoreDocumentImpl

### getReferrer

    public java.lang.String getReferrer()

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

### getDomain

    public java.lang.String getDomain()

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

### getURL

    public java.lang.String getURL()

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

### getCookie

    public java.lang.String getCookie()

  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()

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

### getApplets

    public org.w3c.dom.html.HTMLCollection getApplets()

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

### getLinks

    public org.w3c.dom.html.HTMLCollection getLinks()

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

### getForms

    public org.w3c.dom.html.HTMLCollection getForms()

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

### getAnchors

    public org.w3c.dom.html.HTMLCollection getAnchors()

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

### open

    public void open()

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

### close

    public void close()

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

### write

    public void write(java.lang.String text)

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

### writeln

    public void writeln(java.lang.String text)

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

### cloneNode

    public org.w3c.dom.Node cloneNode(boolean deep)

  Overrides:
    cloneNode in class DocumentImpl

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs81
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD