|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgnu.xml.dom.DomNode
gnu.xml.dom.DomNsNode
gnu.xml.dom.DomElement
public class DomElement
"Element" implementation.
| Field Summary |
|---|
| Fields inherited from interface org.w3c.dom.Node |
|---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Constructor Summary | |
|---|---|
protected |
DomElement(org.w3c.dom.Document owner,
java.lang.String namespaceURI,
java.lang.String name)
Constructs an Element node associated with the specified document. |
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Shallow clone of the element, except that associated attributes are (deep) cloned. |
java.lang.String |
getAttribute(java.lang.String name)
DOM L1 Returns the value of the specified attribute, or an empty string. |
org.w3c.dom.Attr |
getAttributeNode(java.lang.String name)
DOM L1 Returns the appropriate attribute node; the name is the nodeName property of the attribute. |
org.w3c.dom.Attr |
getAttributeNodeNS(java.lang.String namespace,
java.lang.String localPart)
DOM L2 Returns the appropriate attribute node; the name combines the namespace name and the local part. |
java.lang.String |
getAttributeNS(java.lang.String namespaceURI,
java.lang.String local)
DOM L2 Returns the value of the specified attribute, or an empty string. |
org.w3c.dom.NamedNodeMap |
getAttributes()
DOM L1 Returns the element's attributes |
short |
getNodeType()
DOM L1 Returns the constant ELEMENT_NODE. |
java.lang.String |
getTagName()
DOM L1 Returns the element name (same as getNodeName). |
boolean |
hasAttribute(java.lang.String name)
DOM L2 Returns true if the element has an attribute with the specified name (specified or DTD defaulted). |
boolean |
hasAttributeNS(java.lang.String namespaceURI,
java.lang.String local)
DOM L2 Returns true if the element has an attribute with the specified name (specified or DTD defaulted). |
boolean |
hasAttributes()
DOM L2> Returns true iff this is an element node with attributes. |
void |
makeReadonly()
Marks this element, its children, and its associated attributes as readonly. |
void |
removeAttribute(java.lang.String name)
DOM L1 Removes the appropriate attribute node. |
org.w3c.dom.Attr |
removeAttributeNode(org.w3c.dom.Attr node)
DOM L1 Removes the appropriate attribute node; the name is the nodeName property of the attribute. |
void |
removeAttributeNS(java.lang.String namespace,
java.lang.String localPart)
DOM L2 Removes the appropriate attribute node; the name combines the namespace name and the local part. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
DOM L1 Modifies an existing attribute to have the specified value, or creates a new one with that value. |
org.w3c.dom.Attr |
setAttributeNode(org.w3c.dom.Attr attr)
DOM L1 Stores the specified attribute, optionally overwriting any existing one with that name. |
org.w3c.dom.Attr |
setAttributeNodeNS(org.w3c.dom.Attr attr)
DOM L2 Stores the specified attribute, optionally overwriting any existing one with that name. |
void |
setAttributeNS(java.lang.String uri,
java.lang.String aname,
java.lang.String value)
DOM L2 Modifies an existing attribute to have the specified value, or creates a new one with that value. |
| Methods inherited from class gnu.xml.dom.DomNsNode |
|---|
getLocalName, getNamespaceURI, getNodeName, getPrefix, setPrefix |
| Methods inherited from class gnu.xml.dom.DomNode |
|---|
addEventListener, appendChild, cloneNode, compact, createEvent, dispatchEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getLength, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, isReadonly, isSupported, item, nameAndTypeEquals, normalize, removeChild, removeEventListener, replaceChild, setNodeValue, trimToSize |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Element |
|---|
getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
| Methods inherited from interface org.w3c.dom.Node |
|---|
appendChild, cloneNode, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
| Constructor Detail |
|---|
protected DomElement(org.w3c.dom.Document owner,
java.lang.String namespaceURI,
java.lang.String name)
This constructor should only be invoked by a Document as part of its createElement functionality, or through a subclass which is similarly used in a "Sub-DOM" style layer.
owner - The document with which this node is associatednamespaceURI - Combined with the local part of the name,
this is used to uniquely identify a type of elementname - Name of this element, which may include a prefix| Method Detail |
|---|
public org.w3c.dom.NamedNodeMap getAttributes()
getAttributes in interface org.w3c.dom.NodegetAttributes in class DomNodepublic boolean hasAttributes()
hasAttributes in interface org.w3c.dom.NodehasAttributes in class DomNodepublic java.lang.Object clone()
clone in class DomNodepublic void makeReadonly()
makeReadonly in class DomNodepublic final java.lang.String getTagName()
getTagName in interface org.w3c.dom.Elementpublic final short getNodeType()
getNodeType in interface org.w3c.dom.Nodepublic java.lang.String getAttribute(java.lang.String name)
getAttribute in interface org.w3c.dom.Elementpublic boolean hasAttribute(java.lang.String name)
hasAttribute in interface org.w3c.dom.Element
public boolean hasAttributeNS(java.lang.String namespaceURI,
java.lang.String local)
hasAttributeNS in interface org.w3c.dom.Element
public java.lang.String getAttributeNS(java.lang.String namespaceURI,
java.lang.String local)
getAttributeNS in interface org.w3c.dom.Elementpublic org.w3c.dom.Attr getAttributeNode(java.lang.String name)
getAttributeNode in interface org.w3c.dom.Element
public org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespace,
java.lang.String localPart)
getAttributeNodeNS in interface org.w3c.dom.Element
public void setAttribute(java.lang.String name,
java.lang.String value)
setAttribute in interface org.w3c.dom.Element
public void setAttributeNS(java.lang.String uri,
java.lang.String aname,
java.lang.String value)
setAttributeNS in interface org.w3c.dom.Elementpublic org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr attr)
setAttributeNode in interface org.w3c.dom.Elementpublic org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr attr)
setAttributeNodeNS in interface org.w3c.dom.Elementpublic void removeAttribute(java.lang.String name)
Note that since there is no portable way for DOM to record DTD information, default values for attributes will never be provided automatically.
removeAttribute in interface org.w3c.dom.Elementpublic org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr node)
Note that since there is no portable way for DOM to record DTD information, default values for attributes will never be provided automatically.
removeAttributeNode in interface org.w3c.dom.Element
public void removeAttributeNS(java.lang.String namespace,
java.lang.String localPart)
Note that since there is no portable way for DOM to record DTD information, default values for attributes will never be provided automatically.
removeAttributeNS in interface org.w3c.dom.Element
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2012-01-06.