BEA Systems, Inc.

WebLogic Server 6.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.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()).

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.

Version:
$Revision: 1.8 $ $Date: 2000/10/04 08:53:21 $
Author:
Assaf Arkin
See Also:
HTMLDocument, Serialized Form

Fields inherited from class weblogic.apache.xerces.dom.DocumentImpl
allowGrammarAccess, changes, docElement, docType, encoding, errorChecking, eventListeners, identifiers, iterators, kidOK, mutationEvents, ranges, standalone, userData, version
 
Fields inherited from class weblogic.apache.xerces.dom.ParentNode
fCachedChild, fCachedChildIndex, fCachedLength, firstChild, 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, IGNORABLEWS, MUTATION_AGGREGATE, MUTATION_ALL, MUTATION_LOCAL, MUTATION_NONE, MUTATIONEVENTS, OWNED, ownerNode, READONLY, SETVALUE, SPECIFIED, SYNCCHILDREN, SYNCDATA, 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.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
adoptNode, changed, changes, clone, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElementDefinition, createEntity, createEntityReference, createEvent, createNodeIterator, createNodeIterator, createNotation, createProcessingInstruction, createRange, createTextNode, createTreeWalker, createTreeWalker, getDoctype, getEncoding, getErrorChecking, getEventListeners, getIdentifier, getIdentifiers, getImplementation, getMutationEvents, getNodeName, getNodeType, getOwnerDocument, getStandalone, getUserData, getVersion, importNode, insertBefore, isKidOK, isXMLName, putIdentifier, removeChild, removeIdentifier, replaceChild, setEncoding, setErrorChecking, setEventListeners, setMutationEvents, setStandalone, setUserData, setVersion
 
Methods inherited from class weblogic.apache.xerces.dom.ParentNode
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, hasChildNodes, item, normalize, setReadOnly, synchronizeChildren, synchronizeChildren
 
Methods inherited from class weblogic.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling
 
Methods inherited from class weblogic.apache.xerces.dom.NodeImpl
addEventListener, appendChild, dispatchEvent, getAttributes, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getUserData, hasAttributes, isSupported, removeEventListener, setNodeValue, setPrefix, setUserData, synchronizeData, toString
 
Methods inherited from class java.lang.Object
equals, finalize, 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 DocumentImpl

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 DocumentImpl

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 DocumentImpl

getElementsByTagNameNS

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

Overrides:
getElementsByTagNameNS in class DocumentImpl

createElementNS

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

Overrides:
createElementNS in class DocumentImpl

createElement

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

Overrides:
createElement in class DocumentImpl

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

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

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.