JavaScript API Reference for Oracle ADF Faces
|
Oracle Fusion Middleware JavaScript API Reference for Oracle ADF Faces 11g Release 1 (11.1.1) E12046-05 |
||||||||
| PREV NEXT | FRAMES NO FRAMES Warning: private items are visible | ||||||||
org.ecmascript.object.Object
|
+--org.w3c.dom.core.Node
|
+--org.w3c.dom.core.Document
public abstract class Document extends Node
Node objects created have a Node.ownerDocument attribute which associates them with the Document within whose context they were created.
Field Summary |
|
|---|---|
public DocumentType |
|
public Element |
|
public DOMImplementation |
|
Fields inherited from org.w3c.dom.core.Node |
ATTRIBUTE_NODE, attributes, CDATA_SECTION_NODE, childNodes, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, NOTATION_NODE, ownerDocument, parentNode, prefix, previousSibling, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Fields inherited from org.ecmascript.object.Object |
constructor, prototype |
Method Summary |
|
|---|---|
public Attr |
|
public Attr |
|
public CDATASection |
|
public Comment |
|
public DocumentFragment |
|
public Element |
|
public Element |
|
public EntityReference |
|
public ProcessingInstruction |
|
public Text |
|
public Element |
|
public NodeList |
|
public NodeList |
|
public Node |
|
Methods inherited from org.w3c.dom.core.Node |
appendChild, cloneNode, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild |
Field Detail |
|---|
public DocumentType docTypeNode interface. This is a readonly attributepublic Element documemtElementpublic DOMImplementation ImplementationExample:<div id="doc">
<div>
Text in the first DIV.
</div>
<div id="DDD" class="secondClass">
Some text in the second DIV.
</div>
<div class="thirdClass">
Some text and <span id="SSS">element</span> in the third DIV.
</div>
<div class="fourthClass">
We can try <i>another elements</i>.
It will be much more <b>interesting</b>.
</div>
<div>
Text in the last DIV.
</div>
</div>
Method Detail |
|---|
public Attr createAttribute(String name)Attr instance can then be set on an Element using the setAttribute() method.Example:<div >
<div>
Text in the first DIV.
</div>
<div >
Some text in the second DIV.
</div>
<div class="thirdClass">
Some text and <span >element</span> in the third DIV.
</div>
<div class="fourthClass">
We can try <i>another elements</i>.
It will be much more <b>interesting</b>.
</div>
<div>
Text in the last DIV.
</div>
</div>
name |
- | The name of the attribute to retieve. |
Attr - A new Attr object with the nodeName attribute set to name, and localName, prefix, and namespaceURI set to null. The value of the attribute is the empty string.DOMException INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.public Attr createAttributeNS(String namespaceURI,
String qualifiedName)Attr instance can then be set on an Element using the setAttribute() method.Example:<div >
<div>
Text in the first DIV.
</div>
<div >
Some text in the second DIV.
</div>
<div class="thirdClass">
Some text and <span >element</span> in the third DIV.
</div>
<div class="fourthClass">
We can try <i>another elements</i>.
It will be much more <b>interesting</b>.
</div>
<div>
Text in the last DIV.
</div>
</div>
namespaceURI |
- | The namespace URI of the attribute to create. |
qualifiedName |
- | The qualified name of the attribute to instantiate. |
Attr - A new Attr object. (For complete list of attributes of created Attr object see standard.)DOMException INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.DOMException NAMESPACE_ERR: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is null, if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from "http://www.w3.org/XML/1998/namespace", or if the qualifiedName is "xmlns" and the namespaceURI is different from "http://www.w3.org/2000/xmlns/".public CDATASection createCDATASection(String data)JavaScript:var cSection = document.createCDATASection('some text for CDATA-section');data |
- | The data for the CDATASection contents. |
CDATASection - The new CDATASection object.DOMException NOT_SUPPORTED_ERR: Raised if this document is an HTML document.public Comment createComment(String data)JavaScript:var comm = document.createComment('This is some comment.');data |
- | The data for the node. |
Comment - The new Comment object.public DocumentFragment createDocumentFragment()Example:
<div >
<div>
Text in the first DIV.
</div>
<div >
Some text in the second DIV.
</div>
<div class="thirdClass">
Some text and <span >element</span> in the third DIV.
</div>
<div class="fourthClass">
We can try <i>another elements</i>.
It will be much more <b>interesting</b>.
</div>
<div>
Text in the last DIV.
</div>
</div>
DocumentFragment - A new DocumentFragment object.public Element createElement(String tagName)Element interface, so attributes can be specified directly on the returned object.JavaScript:var elem = document.createElement('P');tagName |
- | The name of the element type to instantiate. (Remember that for XML this is case-sensitive.) |
Element - A new Element object with the Node.nodeName attribute set to "Element#tagName", and Node.localName, Node.prefix, and Node.namespaceURI set to null.DOMException INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.public Element createElementNS(String namespaceURI,
String qualifiedName)JavaScript:var main = document.getElementById('doc');namespaceURI |
- | The namespace URI of the element to create. |
qualifiedName |
- | The qualified name of the element type to instantiate. |
Element - A new Element object with the following attributes. (DOMException INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.DOMException NAMESPACE_ERR: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from "http://www.w3.org/XML/1998/namespace" [Namespaces].public EntityReference createEntityReference(String name)EntityReference object. In addition, if the referenced entity is known, the child list of the EntityReference node is made the same as that of the corresponding Entity node.Entity node has an unbound namespace prefix, the corresponding descendant of the created EntityReference node is also unbound; (its namespaceURI is null). The DOM Level 2 does not support any mechanism to resolve namespace prefixes.name |
- | The name of the entity to reference. |
EntityReference - The new EntityReference object.DOMException INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.DOMException NOT_SUPPORTED_ERR: Raised if this document is an HTML document.public ProcessingInstruction createProcessingInstruction(String target,
String data)JavaScript:var pi = document.createProcessingInstruction('php', 'echo("another example")');target |
- | The target part of the processing instruction. |
data |
- | The data for the node. |
ProcessingInstruction - The new ProcessingInstruction object.DOMException INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.DOMException NOT_SUPPORTED_ERR: Raised if this document is an HTML document.public Text createTextNode(String data)JavaScript:var elem = document.createTextNode('This is some text.');data |
- | The data for the node. |
Text - The new Text object.public Element getElementById(String elementId)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.Example:<div >
<div>
Text in the first DIV.
</div>
<div >
Some text in the second DIV.
</div>
<div class="thirdClass">
Some text and <span >element</span> in the third DIV.
</div>
<div class="fourthClass">
We can try <i>another elements</i>.
It will be much more <b>interesting</b>.
</div>
<div>
Text in the last DIV.
</div>
</div>
elementId |
- | The unique id value for an element. |
Element - The matching element.public NodeList getElementByTagName(String tagName)NodeList of all the Element with a given tag name in the order in which they are encountered in a preorder traversal of the Document tree.Example:<div >
<div>
Text in the first DIV.
</div>
<div >
Some text in the second DIV.
</div>
<div class="thirdClass">
Some text and <span >element</span> in the third DIV.
</div>
<div class="fourthClass">
We can try <i>another elements</i>.
It will be much more <b>interesting</b>.
</div>
<div>
Text in the last DIV.
</div>
</div>
tagName |
- | The name of the tag to match on. The special value "*" matches all tags. |
NodeList - A new NodeList object containing all the matched Elements.public NodeList getElementByTagNameNS(String namespaceURI,
String localName)namespaceURI |
- | The namespace URI of the elements to match on. The special value "*" matches all namespaces. |
localName |
- | The local name of the elements to match on. The special value "*" matches all local names. |
NodeList - A new NodeList object containing all the matched Elements.public Node importNode(Node importedNode,
Boolean deep)Attr. The descendant of the source Attr are recursively imported and the resulting nodes reassembled to form the corresponding subtree.Attr nodes; they always carry their children with them when imported.DocumentFragment.Document nodes cannot be imported.DocumentType nodes cannot be imported.Attr nodes are attached to the generated Element. Default attributes are not copied, though if the document being imported into defines default attributes for this element name, those are assigned. If the importNode deep parameter was set to true, the descendants of the source element are recursively imported and the resulting nodes reassembled to form the corresponding subtree.Entity nodes can be imported, however in the current release of the DOM the DocumentType is readonly. Ability to add these imported nodes to a DocumentType will be considered for addition to a future release of the DOM.Entity are recursively imported and the resulting nodes reassembled to form the corresponding subtree.EntityReference itself is copied, even if a deep import is requested, since the source and destination documents might have defined the entity differently. If the document being imported into provides a definition for this entity name, its value is assigned.Notation nodes can be imported, however in the current release of the DOM the DocumentType is readonly. Ability to add these imported nodes to a DocumentType will be considered for addition to a future release of the DOM.deep parameter has no effect on Notation nodes since they never have any children.CharacterData copy their data and length attributes fromthose of the source node.importedNode |
- | The node to import. |
deep |
- | If true, recursively import the subtree under the specified node; if false, import only the node itself, as explained above. This has no effect on Attr, EntityReference, and Notation nodes. |
Node - The imported node that belongs to this Document.DOMException NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported.
|
Oracle Fusion Middleware JavaScript API Reference for Oracle ADF Faces 11g Release 1 (11.1.1) E12046-05 |
||||||||
| PREV NEXT | FRAMES NO FRAMES Warning: private items are visible | ||||||||