|
Oracle Fusion Middleware Oracle WebLogic Server API Reference 11g Release 1 (10.3.4) Part Number E13941-04 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
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 (HTMLDocumentImpl.open()
, HTMLDocumentImpl.write(java.lang.String)
) and HTTP attribute
methods (HTMLDocumentImpl.getURL()
, HTMLDocumentImpl.getCookie()
).
HTMLDocument
,
Serialized FormField Summary |
---|
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()
Deprecated. |
Method Summary | |
---|---|
Node |
cloneNode(boolean deep)
Deprecated. Deep-clone a document, including fixing ownerDoc for the cloned children. |
void |
close()
Deprecated. |
Attr |
createAttribute(String name)
Deprecated. Creates an Attribute having this Document as its OwnerDoc. |
Element |
createElement(String tagName)
Deprecated. Factory method; creates an Element having this Document as its OwnerDoc. |
Element |
createElementNS(String namespaceURI,
String qualifiedName)
Deprecated. Introduced in DOM Level 2. |
Element |
createElementNS(String namespaceURI,
String qualifiedName,
String localpart)
Deprecated. Xerces-specific constructor. |
org.w3c.dom.html.HTMLCollection |
getAnchors()
Deprecated. |
org.w3c.dom.html.HTMLCollection |
getApplets()
Deprecated. |
org.w3c.dom.html.HTMLElement |
getBody()
Deprecated. |
String |
getCookie()
Deprecated. |
Element |
getDocumentElement()
Deprecated. Convenience method, allowing direct access to the child node which is considered the root of the actual document content. |
String |
getDomain()
Deprecated. |
Element |
getElementById(String elementId)
Deprecated. Introduced in DOM Level 2 Returns the Element whose ID is given by elementId. |
NodeList |
getElementsByName(String elementName)
Deprecated. |
NodeList |
getElementsByTagName(String tagName)
Deprecated. Return a live collection of all descendent Elements (not just immediate children) having the specified tag name. |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
Deprecated. Introduced in DOM Level 2. |
org.w3c.dom.html.HTMLCollection |
getForms()
Deprecated. |
org.w3c.dom.html.HTMLElement |
getHead()
Deprecated. Obtains the <HEAD> element in the document, creating one if does not exist before. |
org.w3c.dom.html.HTMLCollection |
getImages()
Deprecated. |
org.w3c.dom.html.HTMLCollection |
getLinks()
Deprecated. |
String |
getReferrer()
Deprecated. |
String |
getTitle()
Deprecated. |
String |
getURL()
Deprecated. |
void |
open()
Deprecated. |
void |
setBody(org.w3c.dom.html.HTMLElement newBody)
Deprecated. |
void |
setCookie(String cookie)
Deprecated. |
void |
setTitle(String newTitle)
Deprecated. |
void |
write(String text)
Deprecated. |
void |
writeln(String text)
Deprecated. |
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 |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, 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 Detail |
---|
public HTMLDocumentImpl()
Method Detail |
---|
public Element getDocumentElement()
weblogic.apache.xerces.dom.CoreDocumentImpl
getDocumentElement
in interface Document
getDocumentElement
in class weblogic.apache.xerces.dom.CoreDocumentImpl
public org.w3c.dom.html.HTMLElement getHead()
HTMLDocumentImpl.getDocumentElement()
. If the element does not exist, one
is created.
Called by HTMLDocumentImpl.getTitle()
, HTMLDocumentImpl.setTitle(java.lang.String)
, HTMLDocumentImpl.getBody()
and
HTMLDocumentImpl.setBody(org.w3c.dom.html.HTMLElement)
to assure the document has the <HEAD> element
correctly placed.
public String getTitle()
getTitle
in interface org.w3c.dom.html.HTMLDocument
public void setTitle(String newTitle)
setTitle
in interface org.w3c.dom.html.HTMLDocument
public org.w3c.dom.html.HTMLElement getBody()
getBody
in interface org.w3c.dom.html.HTMLDocument
public void setBody(org.w3c.dom.html.HTMLElement newBody)
setBody
in interface org.w3c.dom.html.HTMLDocument
public Element getElementById(String elementId)
weblogic.apache.xerces.dom.CoreDocumentImpl
Note: 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.
getElementById
in interface Document
getElementById
in class weblogic.apache.xerces.dom.CoreDocumentImpl
CoreDocumentImpl.getIdentifier(java.lang.String)
public NodeList getElementsByName(String elementName)
getElementsByName
in interface org.w3c.dom.html.HTMLDocument
public final NodeList getElementsByTagName(String tagName)
weblogic.apache.xerces.dom.CoreDocumentImpl
getElementsByTagName
in interface Document
getElementsByTagName
in class weblogic.apache.xerces.dom.CoreDocumentImpl
tagName
- The type of Element we want to gather. "*" will be
taken as a wildcard, meaning "all elements in the document."DeepNodeListImpl
public final NodeList getElementsByTagNameNS(String namespaceURI, String localName)
weblogic.apache.xerces.dom.CoreDocumentImpl
Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they would be encountered in a preorder traversal of the Document tree.
getElementsByTagNameNS
in interface Document
getElementsByTagNameNS
in class weblogic.apache.xerces.dom.CoreDocumentImpl
namespaceURI
- The namespace URI of the elements to match
on. The special value "*" matches all
namespaces. When it is null or an empty
string, this method behaves like
getElementsByTagName.localName
- The local name of the elements to match on.
The special value "*" matches all local names.
public Element createElementNS(String namespaceURI, String qualifiedName, String localpart) throws DOMException
createElementNS
in class weblogic.apache.xerces.dom.CoreDocumentImpl
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.
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified
name contains an invalid character.public Element createElementNS(String namespaceURI, String qualifiedName)
weblogic.apache.xerces.dom.CoreDocumentImpl
Creates an element of the given qualified name and namespace URI. If the given namespaceURI is null or an empty string and the qualifiedName has a prefix that is "xml", the created element is bound to the predefined namespace "http://www.w3.org/XML/1998/namespace" [Namespaces].
createElementNS
in interface Document
createElementNS
in class weblogic.apache.xerces.dom.CoreDocumentImpl
namespaceURI
- The namespace URI of the element to
create.qualifiedName
- The qualified name of the element type to
instantiate.
public Element createElement(String tagName) throws DOMException
weblogic.apache.xerces.dom.CoreDocumentImpl
createElement
in interface Document
createElement
in class weblogic.apache.xerces.dom.CoreDocumentImpl
tagName
- The name of the element type to instantiate. For
XML, this is case-sensitive. For HTML, the tagName parameter may
be provided in any case, but it must be mapped to the canonical
uppercase form by the DOM implementation.
DOMException
public Attr createAttribute(String name) throws DOMException
CoreDocumentImpl.createAttribute(java.lang.String)
and returns
and attribute whose name is lower case.
createAttribute
in interface Document
createAttribute
in class weblogic.apache.xerces.dom.CoreDocumentImpl
name
- The name of the attribute
DOMException(INVALID_NAME_ERR)
- if the attribute name
is not acceptable
DOMException
public String getReferrer()
getReferrer
in interface org.w3c.dom.html.HTMLDocument
public String getDomain()
getDomain
in interface org.w3c.dom.html.HTMLDocument
public String getURL()
getURL
in interface org.w3c.dom.html.HTMLDocument
public String getCookie()
getCookie
in interface org.w3c.dom.html.HTMLDocument
public void setCookie(String cookie)
setCookie
in interface org.w3c.dom.html.HTMLDocument
public org.w3c.dom.html.HTMLCollection getImages()
getImages
in interface org.w3c.dom.html.HTMLDocument
public org.w3c.dom.html.HTMLCollection getApplets()
getApplets
in interface org.w3c.dom.html.HTMLDocument
public org.w3c.dom.html.HTMLCollection getLinks()
getLinks
in interface org.w3c.dom.html.HTMLDocument
public org.w3c.dom.html.HTMLCollection getForms()
getForms
in interface org.w3c.dom.html.HTMLDocument
public org.w3c.dom.html.HTMLCollection getAnchors()
getAnchors
in interface org.w3c.dom.html.HTMLDocument
public void open()
open
in interface org.w3c.dom.html.HTMLDocument
public void close()
close
in interface org.w3c.dom.html.HTMLDocument
public void write(String text)
write
in interface org.w3c.dom.html.HTMLDocument
public void writeln(String text)
writeln
in interface org.w3c.dom.html.HTMLDocument
public Node cloneNode(boolean deep)
weblogic.apache.xerces.dom.DocumentImpl
cloneNode
in interface Node
cloneNode
in class weblogic.apache.xerces.dom.DocumentImpl
deep
- boolean, iff true replicate children
Example: Cloning a Text node will copy both the node and the text it
contains.
Example: Cloning something that has children -- Element or Attr, for
example -- will _not_ clone those children unless a "deep clone"
has been requested. A shallow clone of an Attr node will yield an
empty Attr of the same name.
NOTE: Clones will always be read/write, even if the node being cloned
is read-only, to permit applications using only the DOM API to obtain
editable copies of locked portions of the tree.
|
Copyright 1996, 2010, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Oracle WebLogic Server API Reference 11g Release 1 (10.3.4) Part Number E13941-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |