JavaScript API Reference for Oracle ADF Faces
|
Oracle Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.3) E80085-01 |
||||||||
| PREV NEXT | FRAMES NO FRAMES Warning: private items are visible | ||||||||
org.ecmascript.object.Object | +--org.w3c.dom.core.NamedNodeMap
public abstract class NamedNodeMap extends Object
Field Summary |
|
|---|---|
public Number |
|
Fields inherited from org.ecmascript.object.Object |
constructor, prototype |
Method Summary |
|
|---|---|
public Node |
|
public Node |
|
public Node |
|
public Node |
|
public Node |
|
public Node |
|
public Node |
|
Field Detail |
|---|
public Number lengthExample:
<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>
JavaScript:var main = document.getElementById('doc');var attrNode = main.childNodes[3].attributes;var output = attrNode.length;
Method Detail |
|---|
public Node getNamedItem(String name)Example:
<div id="doc">
<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>
JavaScript:var main = document.getElementById('doc');var attrNode = main.childNodes[3].attributes;var output = attrNode.getNamedItem('class').nodeValue;name |
- | The nodeName of a node to retrieve. of the document fragment are moved into the child list of this node. |
Node - A Node (of any type) with the specified nodeName, or null if it does not identify any node in this map.public Node getNamedItemNS(String namespaceURI,
String localName)Example:
<div xmlns:svg="http://www.w3.org/2000/svg">
<div>
Text in the first DIV.
</div>
<svg:svg id="logo" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="60">
<svg:g style="fill:#3399cc; font-size:36pt; font-family:'dialog'; font-weight: bold">
<svg:a xlink:type="simple" xlink:href="http://www.zvon.org">
<svg:text x="50%" y="65%" text-anchor="middle">ZVON.org</svg:text>
</svg:a>
</svg:g>
</svg:svg>
<apply xmlns="http://www.w3.org/1998/Math/MathML">
<int/>
<bvar>
<ci> x </ci>
</bvar>
<interval>
<ci> a </ci>
<ci> b </ci>
</interval>
<apply>
<cos/>
<ci> x </ci>
</apply>
</apply>
<div>
Text in the last DIV.
</div>
</div>
JavaScript:var elem = document.getElementsByTagName('svg:a')[0].attributes;var output = elem.getNamedItemNS('http://www.w3.org/1999/xlink', 'href').value;namespaceURI |
- | The namespace URI of the node to retrieve. |
localName |
- | The local name of the node to retrieve. |
Node - A Node (of any type) with the specified local nodeName and namespace URI, or null if it does not identify any node in this map.public Node item(Number index)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>
JavaScript:var main = document.getElementById('doc');var attrNode = main.childNodes[3].attributes;var output = attrNode.item(0).nodeValue;index |
- | The Index into this map. |
Node - The node at the indexth position in the NamedNodeMap, or null if that is not a valid index.public Node removeNamedItem(String name)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>
JavaScript:var main = document.getElementById('doc');var attrNode = main.childNodes[3].attributes;var removedNode = attrNode.removeNamedItem('class');var output1 = removedNode.nodeValue;var output2 = attrNode.getNamedItem('class');name |
- | The nodeName of a node to remove. |
Node - The node removed from this map if a node with such a name exists.DOMException NOT_FOUND_ERR: Raised if there is no node named name in this map.DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.public Node removeNamedItemNS(String namespaceURI,
String localName)Example:
<div >
<div>
Text in the first DIV.
</div>
<svg:svg >
<svg:g style="fill:#3399cc; font-size:36pt; font-family:'dialog'; font-weight: bold">
<svg:a xlink:type="simple" xlink:href="http://www.zvon.org">
<svg:text x="50%" y="65%" text-anchor="middle">ZVON.org</svg:text>
</svg:a>
</svg:g>
</svg:svg>
<apply xmlns="http://www.w3.org/1998/Math/MathML">
<int/>
<bvar>
<ci> x </ci>
</bvar>
<interval>
<ci> a </ci>
<ci> b </ci>
</interval>
<apply>
<cos/>
<ci> x </ci>
</apply>
</apply>
<div>
Text in the last DIV.
</div>
</div>
JavaScript:var elem = document.getElementsByTagName('svg:a')[0].attributes;var removedNode = elem.removeNamedItemNS('http://www.w3.org/1999/xlink', 'href');var output1 = removedNode.nodeValue;var output2 = elem.getNamedItemNS('http://www.w3.org/1999/xlink', 'href').value;namespaceURI |
- | The namespace URI of the node to remove. |
localName |
- | The local name of the node to remove. |
Node - The node removed from this map if a node with such a local name and namespace URI exists.DOMException NOT_FOUND_ERR: Raised if there is no node named name in this map.DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.public Node setNamedItem(Node arg)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>
JavaScript:var main = document.getElementById('doc');var attrNode = main.childNodes[3].attributes;var attr = document.createAttribute('temp');attr.value = 'temporary';attrNode.setNamedItem(attr);var output = attrNode.getNamedItem('temp').nodeValue;arg |
- | A node to store in this map. The node will later be accessible using the value of its nodeName attribute. |
Node - If the new Node replaces an existing node the replaced Node is returned, otherwise null is returned.DOMException WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.DOMException INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.public Node setNamedItemNS(Node arg)Example:
<div >
<div>
Text in the first DIV.
</div>
<svg:svg >
<svg:g style="fill:#3399cc; font-size:36pt; font-family:'dialog'; font-weight: bold">
<svg:a xlink:type="simple" xlink:href="http://www.zvon.org">
<svg:text x="50%" y="65%" text-anchor="middle">ZVON.org</svg:text>
</svg:a>
</svg:g>
</svg:svg>
<apply xmlns="http://www.w3.org/1998/Math/MathML">
<int/>
<bvar>
<ci> x </ci>
</bvar>
<interval>
<ci> a </ci>
<ci> b </ci>
</interval>
<apply>
<cos/>
<ci> x </ci>
</apply>
</apply>
<div>
Text in the last DIV.
</div>
</div>
JavaScript:var attrNode = document.getElementById('doc').attributes;var attr = document.createAttributeNS('http://zvon.org/namespaces/test', 'zvon:temp');attr.value = 'temporary';attrNode.setNamedItemNS(attr);var output = attrNode.getNamedItemNS('http://zvon.org/namespaces/test', 'zvon:temp').nodeValue;arg |
- | A node to store in this map. The node will later be accessible using the value of its namespaceURI and localName attributes. |
Node - If the new Node replaces an existing node the replaced Node is returned, otherwise null is returned.DOMException WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.DOMException INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
|
Oracle Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.3) E80085-01 |
||||||||
| PREV NEXT | FRAMES NO FRAMES Warning: private items are visible | ||||||||