com.hp.hpl.thermopylae
Class ElementImpl

java.lang.Object
  |
  +--com.hp.hpl.thermopylae.NodeImpl
        |
        +--com.hp.hpl.thermopylae.ElementImpl
All Implemented Interfaces:
org.w3c.dom.Element, org.w3c.dom.Node

public class ElementImpl
extends NodeImpl
implements org.w3c.dom.Element

Wrapper around a sparta Element.

Copyright (C) 2002 Hewlett-Packard Company. This file is part of Sparta, an XML Parser, DOM, and XPath library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Version:
$Date: 2002/08/19 05:04:17 $ $Revision: 1.1.1.1 $
Author:
Eamonn O'Brien-Strain, Sergio Marti

Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE
 
Method Summary
 org.w3c.dom.Node appendChild(org.w3c.dom.Node node)
          Adds the node newChild to the end of the list of children of this node.
 org.w3c.dom.Node cloneNode(boolean deep)
          Return clone of node.
 java.lang.String getAttribute(java.lang.String name)
          Retrieves an attribute value by name.
 org.w3c.dom.Attr getAttributeNode(java.lang.String name)
          Retrieves an attribute node by name.
 org.w3c.dom.Attr getAttributeNodeNS(java.lang.String parm1, java.lang.String parm2)
          Retrieves an Attr node by local name and namespace URI.
 java.lang.String getAttributeNS(java.lang.String parm1, java.lang.String parm2)
          Retrieves an attribute value by local name and namespace URI.
 org.w3c.dom.NamedNodeMap getAttributes()
          A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
 org.w3c.dom.NodeList getChildNodes()
          A NodeList that contains all children of this node.
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)
          Returns a NodeList of all descendant Elements with a given tag name, in document order.
 org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String parm1, java.lang.String parm2)
          Returns a NodeList of all the descendant Elements with a given local name and namespace URI in document order.
 org.w3c.dom.Node getFirstChild()
          The first child of this node.
 org.w3c.dom.Node getLastChild()
          The last child of this node.
 java.lang.String getLocalName()
          Returns the local part of the qualified name of this node.
 java.lang.String getNamespaceURI()
          The namespace URI of this node, or null if it is unspecified.
 java.lang.String getNodeName()
          The name of this node, depending on its type; see the table above.
 short getNodeType()
          A code representing the type of the underlying object, as defined above.
 java.lang.String getNodeValue()
          The value of this node, depending on its type; see the table above.
 org.w3c.dom.Node getParentNode()
          The parent of this node.
 java.lang.String getPrefix()
          The namespace prefix of this node, or null if it is unspecified.
 java.lang.String getTagName()
          The name of the element.
 boolean hasAttribute(java.lang.String parm1)
          Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.
 boolean hasAttributeNS(java.lang.String parm1, java.lang.String parm2)
          Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.
 boolean hasAttributes()
          Returns whether this node (if it is an element) has any attributes.
 boolean hasChildNodes()
          Returns whether this node has any children.
 org.w3c.dom.Node insertBefore(org.w3c.dom.Node parm1, org.w3c.dom.Node parm2)
          Inserts the node newChild before the existing child node refChild.
 boolean isSupported(java.lang.String feature, java.lang.String version)
          Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
 void normalize()
          Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
 void removeAttribute(java.lang.String name)
          Removes an attribute by name.
 org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr parm1)
          Removes the specified attribute node.
 void removeAttributeNS(java.lang.String parm1, java.lang.String parm2)
          Removes an attribute by local name and namespace URI.
 org.w3c.dom.Node removeChild(org.w3c.dom.Node child)
          Removes the child node indicated by oldChild from the list of children, and returns it.
 org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild)
          Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
 void setAttribute(java.lang.String name, java.lang.String value)
          Adds a new attribute.
 org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr parm1)
          Adds a new attribute node.
 org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr attr)
          Adds a new attribute.
 void setAttributeNS(java.lang.String parm1, java.lang.String parm2, java.lang.String parm3)
          Adds a new attribute.
 void setNodeValue(java.lang.String parm1)
          The value of this node, depending on its type; see the table above.
 void setPrefix(java.lang.String parm1)
          The namespace prefix of this node, or null if it is unspecified.
 
Methods inherited from class com.hp.hpl.thermopylae.NodeImpl
compareTreePosition, equals, getBaseURI, getInterface, getNextSibling, getOwnerDocument, getPreviousSibling, getTextContent, getUserData, isEqualNode, isSameNode, lookupNamespacePrefix, lookupNamespaceURI, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
compareTreePosition, getBaseURI, getInterface, getNextSibling, getOwnerDocument, getPreviousSibling, getTextContent, getUserData, isEqualNode, isSameNode, lookupNamespacePrefix, lookupNamespaceURI, setTextContent, setUserData
 

Method Detail

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Description copied from interface: org.w3c.dom.Element
Retrieves an attribute value by name.
Specified by:
getAttribute in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
name - The name of the attribute to retrieve.
Returns:
The Attr value as a string, or the empty string if that attribute does not have a specified or default value.

getAttributeNS

public java.lang.String getAttributeNS(java.lang.String parm1,
                                       java.lang.String parm2)
Description copied from interface: org.w3c.dom.Element
Retrieves an attribute value by local name and namespace URI.
Documents which do not support the "XML" feature will permit only the DOM Level 1 calls for creating/setting elements and attributes. Hence, if you specify a non-null namespace URI, these DOMs will never find a matching node.
Per , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
Specified by:
getAttributeNS in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
namespaceURI - The namespace URI of the attribute to retrieve.
localName - The local name of the attribute to retrieve.
Returns:
The Attr value as a string, or the empty string if that attribute does not have a specified or default value.

getAttributeNode

public org.w3c.dom.Attr getAttributeNode(java.lang.String name)
Description copied from interface: org.w3c.dom.Element
Retrieves an attribute node by name.
To retrieve an attribute node by qualified name and namespace URI, use the getAttributeNodeNS method.
Specified by:
getAttributeNode in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
name - The name (nodeName) of the attribute to retrieve.
Returns:
The Attr node with the specified name ( nodeName) or null if there is no such attribute.

getAttributeNodeNS

public org.w3c.dom.Attr getAttributeNodeNS(java.lang.String parm1,
                                           java.lang.String parm2)
Description copied from interface: org.w3c.dom.Element
Retrieves an Attr node by local name and namespace URI.
Documents which do not support the "XML" feature will permit only the DOM Level 1 calls for creating/setting elements and attributes. Hence, if you specify a non-null namespace URI, these DOMs will never find a matching node.
Per , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
Specified by:
getAttributeNodeNS in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
namespaceURI - The namespace URI of the attribute to retrieve.
localName - The local name of the attribute to retrieve.
Returns:
The Attr node with the specified attribute local name and namespace URI or null if there is no such attribute.

getElementsByTagName

public org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagName)
Description copied from interface: org.w3c.dom.Element
Returns a NodeList of all descendant Elements with a given tag name, in document order.
Specified by:
getElementsByTagName in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
name - The name of the tag to match on. The special value "*" matches all tags.
Returns:
A list of matching Element nodes.

getElementsByTagNameNS

public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String parm1,
                                                   java.lang.String parm2)
Description copied from interface: org.w3c.dom.Element
Returns a NodeList of all the descendant Elements with a given local name and namespace URI in document order.
Documents which do not support the "XML" feature will permit only the DOM Level 1 calls for creating/setting elements and attributes. Hence, if you specify a non-null namespace URI, these DOMs will never find a matching node.
Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
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.
Returns:
A new NodeList object containing all the matched Elements.

getTagName

public java.lang.String getTagName()
Description copied from interface: org.w3c.dom.Element
The name of the element. For example, in:
 <elementExample 
 id="demo"> ... </elementExample> , 
tagName has the value "elementExample". Note that this is case-preserving in XML, as are all of the operations of the DOM. The HTML DOM returns the tagName of an HTML element in the canonical uppercase form, regardless of the case in the source HTML document.
Specified by:
getTagName in interface org.w3c.dom.Element

hasAttribute

public boolean hasAttribute(java.lang.String parm1)
Description copied from interface: org.w3c.dom.Element
Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.
Specified by:
hasAttribute in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
name - The name of the attribute to look for.
Returns:
true if an attribute with the given name is specified on this element or has a default value, false otherwise.

hasAttributeNS

public boolean hasAttributeNS(java.lang.String parm1,
                              java.lang.String parm2)
Description copied from interface: org.w3c.dom.Element
Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.
Documents which do not support the "XML" feature will permit only the DOM Level 1 calls for creating/setting elements and attributes. Hence, if you specify a non-null namespace URI, these DOMs will never find a matching node.
Per , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
Specified by:
hasAttributeNS in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
namespaceURI - The namespace URI of the attribute to look for.
localName - The local name of the attribute to look for.
Returns:
true if an attribute with the given local name and namespace URI is specified or has a default value on this element, false otherwise.

removeAttribute

public void removeAttribute(java.lang.String name)
                     throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Element
Removes an attribute by name. If the removed attribute is known to have a default value, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable. If the attribute does not have a specified or default value, calling this method has no effect.
To remove an attribute by local name and namespace URI, use the removeAttributeNS method.
Specified by:
removeAttribute in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
name - The name of the attribute to remove.
Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

removeAttributeNS

public void removeAttributeNS(java.lang.String parm1,
                              java.lang.String parm2)
                       throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Element
Removes an attribute by local name and namespace URI. If the removed attribute has a default value it is immediately replaced. The replacing attribute has the same namespace URI and local name, as well as the original prefix. If the attribute does not have a specified or default value, calling this method has no effect.
Documents which do not support the "XML" feature will permit only the DOM Level 1 calls for creating/setting elements and attributes. Hence, if you specify a non-null namespace URI, these DOMs will never find a matching node.
Per , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
Specified by:
removeAttributeNS in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
namespaceURI - The namespace URI of the attribute to remove.
localName - The local name of the attribute to remove.
Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

removeAttributeNode

public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr parm1)
                                     throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Element
Removes the specified attribute node. If the removed Attr has a default value it is immediately replaced. The replacing attribute has the same namespace URI and local name, as well as the original prefix, when applicable.
Specified by:
removeAttributeNode in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
oldAttr - The Attr node to remove from the attribute list.
Returns:
The Attr node that was removed.
Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldAttr is not an attribute of the element.

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
                  throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Element
Adds a new attribute. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter. This value is a simple string; it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNode to assign it as the value of an attribute.
To set an attribute with a qualified name and namespace URI, use the setAttributeNS method.
Specified by:
setAttribute in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
name - The name of the attribute to create or alter.
value - Value to set in string form.
Throws:
org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

setAttributeNS

public void setAttributeNS(java.lang.String parm1,
                           java.lang.String parm2,
                           java.lang.String parm3)
                    throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Element
Adds a new attribute. If an attribute with the same local name and namespace URI is already present on the element, its prefix is changed to be the prefix part of the qualifiedName, and its value is changed to be the value parameter. This value is a simple string; it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNodeNS or setAttributeNode to assign it as the value of an attribute.
Per , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
Specified by:
setAttributeNS in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
namespaceURI - The namespace URI of the attribute to create or alter.
qualifiedName - The qualified name of the attribute to create or alter.
value - The value to set in string form.
Throws:
org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification .
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML specification, 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, or its prefix, is "xmlns" and the namespaceURI is different from " http://www.w3.org/2000/xmlns/".
NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.

setAttributeNode

public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr parm1)
                                  throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Element
Adds a new attribute node. If an attribute with that name ( nodeName) is already present in the element, it is replaced by the new one.
To add a new attribute node with a qualified name and namespace URI, use the setAttributeNodeNS method.
Specified by:
setAttributeNode in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
newAttr - The Attr node to add to the attribute list.
Returns:
If the newAttr attribute replaces an existing attribute, the replaced Attr node is returned, otherwise null is returned.
Throws:
org.w3c.dom.DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.

setAttributeNodeNS

public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr attr)
                                    throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Element
Adds a new attribute. If an attribute with that local name and that namespace URI is already present in the element, it is replaced by the new one.
Per , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.
Specified by:
setAttributeNodeNS in interface org.w3c.dom.Element
Following copied from interface: org.w3c.dom.Element
Parameters:
newAttr - The Attr node to add to the attribute list.
Returns:
If the newAttr attribute replaces an existing attribute with the same local name and namespace URI, the replaced Attr node is returned, otherwise null is returned.
Throws:
org.w3c.dom.DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.

appendChild

public org.w3c.dom.Node appendChild(org.w3c.dom.Node node)
                             throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Node
Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed.
Specified by:
appendChild in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Parameters:
newChild - The node to add.If it is a DocumentFragment object, the entire contents of the document fragment are moved into the child list of this node
Returns:
The node added.
Throws:
org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to append is one of this node's ancestors or this node itself.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if the previous parent of the node being inserted is readonly.

cloneNode

public org.w3c.dom.Node cloneNode(boolean deep)
Return clone of node.
Specified by:
cloneNode in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Parameters:
deep - If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an Element).
Returns:
The duplicate node.

getAttributes

public org.w3c.dom.NamedNodeMap getAttributes()
Description copied from interface: org.w3c.dom.Node
A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
If no namespace declaration appear in the attributes, this attribute represents the property [attributes] defined in .
Specified by:
getAttributes in interface org.w3c.dom.Node

getChildNodes

public org.w3c.dom.NodeList getChildNodes()
Description copied from interface: org.w3c.dom.Node
A NodeList that contains all children of this node. If there are no children, this is a NodeList containing no nodes.
When the node is a Document, or an Element, and if the NodeList does not contain EntityReference or CDATASection nodes, this attribute represents the properties [children] defined in .
Specified by:
getChildNodes in interface org.w3c.dom.Node

getFirstChild

public org.w3c.dom.Node getFirstChild()
Description copied from interface: org.w3c.dom.Node
The first child of this node. If there is no such node, this returns null.
Specified by:
getFirstChild in interface org.w3c.dom.Node

getLastChild

public org.w3c.dom.Node getLastChild()
Description copied from interface: org.w3c.dom.Node
The last child of this node. If there is no such node, this returns null.
Specified by:
getLastChild in interface org.w3c.dom.Node

getLocalName

public java.lang.String getLocalName()
Description copied from interface: org.w3c.dom.Node
Returns the local part of the qualified name of this node.
When the node is Element, or Attr, this attribute represents the properties [local name] defined in .
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
Specified by:
getLocalName in interface org.w3c.dom.Node

getNamespaceURI

public java.lang.String getNamespaceURI()
Description copied from interface: org.w3c.dom.Node
The namespace URI of this node, or null if it is unspecified.
When the node is Element, or Attr, this attribute represents the properties [namespace name] defined in .
This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.Per the Namespaces in XML Specification an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace.
Specified by:
getNamespaceURI in interface org.w3c.dom.Node

getNodeName

public java.lang.String getNodeName()
Description copied from interface: org.w3c.dom.Node
The name of this node, depending on its type; see the table above.
Specified by:
getNodeName in interface org.w3c.dom.Node

getNodeType

public short getNodeType()
Description copied from interface: org.w3c.dom.Node
A code representing the type of the underlying object, as defined above.
Specified by:
getNodeType in interface org.w3c.dom.Node

getNodeValue

public java.lang.String getNodeValue()
                              throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Node
The value of this node, depending on its type; see the table above. When it is defined to be null, setting it has no effect.
Specified by:
getNodeValue in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
org.w3c.dom.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

getParentNode

public org.w3c.dom.Node getParentNode()
Description copied from interface: org.w3c.dom.Node
The parent of this node. All nodes, except Attr, Document, DocumentFragment, Entity, and Notation may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is null.
When the node is an Element, a ProcessingInstruction, an EntityReference, a CharacterData, a Comment, or a DocumentType, this attribute represents the properties [parent] defined in .
Specified by:
getParentNode in interface org.w3c.dom.Node

getPrefix

public java.lang.String getPrefix()
Description copied from interface: org.w3c.dom.Node
The namespace prefix of this node, or null if it is unspecified.
When the node is Element, or Attr, this attribute represents the properties [prefix] defined in .
Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
Specified by:
getPrefix in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character, per the XML 1.0 specification .
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the specified prefix is malformed per the Namespaces in XML specification, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from "http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from " http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns" .

hasAttributes

public boolean hasAttributes()
Description copied from interface: org.w3c.dom.Node
Returns whether this node (if it is an element) has any attributes.
Specified by:
hasAttributes in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Returns:
true if this node has any attributes, false otherwise.

hasChildNodes

public boolean hasChildNodes()
Description copied from interface: org.w3c.dom.Node
Returns whether this node has any children.
Specified by:
hasChildNodes in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Returns:
true if this node has any children, false otherwise.

insertBefore

public org.w3c.dom.Node insertBefore(org.w3c.dom.Node parm1,
                                     org.w3c.dom.Node parm2)
                              throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Node
Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children.
If newChild is a DocumentFragment object, all of its children are inserted, in the same order, before refChild. If the newChild is already in the tree, it is first removed.
Specified by:
insertBefore in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Parameters:
newChild - The node to insert.
refChild - The reference node, i.e., the node before which the new node must be inserted.
Returns:
The node being inserted.
Throws:
org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to insert is one of this node's ancestors or this node itself, or if this node if of type Document and the DOM application attempts to insert a second DocumentType or Element node.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if the parent of the node being inserted is readonly.
NOT_FOUND_ERR: Raised if refChild is not a child of this node.
NOT_SUPPORTED_ERR: if this node if of type Document, this exception might be raised if the DOM implementation doesn't support the insertion of a DocumentType or Element node.

isSupported

public boolean isSupported(java.lang.String feature,
                           java.lang.String version)
Description copied from interface: org.w3c.dom.Node
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
Specified by:
isSupported in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Parameters:
feature - The name of the feature to test. This is the same name which can be passed to the method hasFeature on DOMImplementation.
version - This is the version number of the feature to test. In Level 2, version 1, this is the string "2.0". If the version is not specified, supporting any version of the feature will cause the method to return true.
Returns:
Returns true if the specified feature is supported on this node, false otherwise.

normalize

public void normalize()
Description copied from interface: org.w3c.dom.Node
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used.In cases where the document contains CDATASections, the normalize operation alone may not be sufficient, since XPointers do not differentiate between Text nodes and CDATASection nodes.
Specified by:
normalize in interface org.w3c.dom.Node

removeChild

public org.w3c.dom.Node removeChild(org.w3c.dom.Node child)
                             throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Node
Removes the child node indicated by oldChild from the list of children, and returns it.
Specified by:
removeChild in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Parameters:
oldChild - The node being removed.
Returns:
The node removed.
Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.
NOT_SUPPORTED_ERR: if this node if of type Document, this exception might be raised if the DOM implementation doesn't support the removal of the DocumentType child or the Element child.

replaceChild

public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild,
                                     org.w3c.dom.Node oldChild)
                              throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Node
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
If newChild is a DocumentFragment object, oldChild is replaced by all of the DocumentFragment children, which are inserted in the same order. If the newChild is already in the tree, it is first removed.
Specified by:
replaceChild in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Parameters:
newChild - The new node to put in the child list.
oldChild - The node being replaced in the list.
Returns:
The node replaced.
Throws:
org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild node, or if the node to put in is one of this node's ancestors or this node itself.
WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node.
NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of the new node is readonly.
NOT_FOUND_ERR: Raised if oldChild is not a child of this node.
NOT_SUPPORTED_ERR: if this node if of type Document, this exception might be raised if the DOM implementation doesn't support the replacement of the DocumentType child or Element child.

setNodeValue

public void setNodeValue(java.lang.String parm1)
                  throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Node
The value of this node, depending on its type; see the table above. When it is defined to be null, setting it has no effect.
Specified by:
setNodeValue in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
org.w3c.dom.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.

setPrefix

public void setPrefix(java.lang.String parm1)
               throws org.w3c.dom.DOMException
Description copied from interface: org.w3c.dom.Node
The namespace prefix of this node, or null if it is unspecified.
When the node is Element, or Attr, this attribute represents the properties [prefix] defined in .
Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
Specified by:
setPrefix in interface org.w3c.dom.Node
Following copied from interface: org.w3c.dom.Node
Throws:
org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character, per the XML 1.0 specification .
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
NAMESPACE_ERR: Raised if the specified prefix is malformed per the Namespaces in XML specification, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from "http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from " http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns" .