|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.util.dom.DOMBase | +--com.beasys.commerce.util.dom.NodeImpl | +--com.beasys.commerce.util.dom.ElementImpl
An implementation of the W3C's DOM Element object.
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 |
Constructor Summary | |
ElementImpl(org.w3c.dom.Document doc,
org.w3c.dom.Node parent,
java.lang.String tagName)
Constructor. |
Method Summary | |
org.w3c.dom.Node |
cloneNode()
Clone this node. |
protected short[] |
getAllowableChildrenTypes()
Get the children types that can added to an element. |
java.lang.String |
getAttribute(java.lang.String name)
Get the attribute by name. |
org.w3c.dom.Attr |
getAttributeNode(java.lang.String name)
Get the attribute node by name. |
org.w3c.dom.NamedNodeMap |
getAttributes()
Get the attributes. |
org.w3c.dom.NodeList |
getElementsByTagName(java.lang.String name)
Get a list of all descendant Elements with the given name, in preorder traversal. |
java.lang.String |
getNodeName()
Get the node name. |
short |
getNodeType()
Return Node.ELEMENT_NODE. |
java.lang.String |
getTagName()
Get the tag name. |
void |
normalize()
Normalize Text nodes under us. |
void |
removeAttribute(java.lang.String name)
Remove the attribute with give name. |
org.w3c.dom.Attr |
removeAttributeNode(org.w3c.dom.Attr attr)
Remove the given attribute node. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Set the named attribute to the given value. |
org.w3c.dom.Attr |
setAttributeNode(org.w3c.dom.Attr attr)
Adds the given attribute. |
void |
setTagName(java.lang.String tagName)
Set the tag name. |
Methods inherited from class com.beasys.commerce.util.dom.NodeImpl |
allowsChildren, appendChild, appendChildren, checkAllowChild, cloneNode, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeType, getNodeValue, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, insertChildrenBefore, isAncestor, removeChild, replaceChild, setNodeValue, setParentNode |
Methods inherited from class com.beasys.commerce.util.dom.DOMBase |
checkOwnerDocument, checkReadOnly, getOwnerDocument, isReadOnly, setReadOnly |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, removeChild, replaceChild, setNodeValue |
Constructor Detail |
public ElementImpl(org.w3c.dom.Document doc, org.w3c.dom.Node parent, java.lang.String tagName)
doc
- the document.parent
- the parent node.tagName
- the tag name.Method Detail |
public org.w3c.dom.Node cloneNode()
cloneNode
in class NodeImpl
public short getNodeType()
getNodeType
in interface org.w3c.dom.Node
getNodeType
in class NodeImpl
protected short[] getAllowableChildrenTypes()
getAllowableChildrenTypes
in class NodeImpl
com.beasys.commerce.util.dom.NodeImpl
public java.lang.String getNodeName()
For Elements, the node name is the tag name.
getNodeName
in interface org.w3c.dom.Node
getNodeName
in class NodeImpl
getTagName()
public java.lang.String getTagName()
getTagName
in interface org.w3c.dom.Element
public void setTagName(java.lang.String tagName)
public org.w3c.dom.NamedNodeMap getAttributes()
getAttributes
in interface org.w3c.dom.Node
getAttributes
in class NodeImpl
com.beasys.commerce.util.dom.NodeImpl
public java.lang.String getAttribute(java.lang.String name)
getAttribute
in interface org.w3c.dom.Element
getAttributeNode(java.lang.String)
public org.w3c.dom.Attr getAttributeNode(java.lang.String name)
getAttributeNode
in interface org.w3c.dom.Element
public org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
getElementsByTagName
in interface org.w3c.dom.Element
DocumentImpl.getElementsByTagName(java.lang.String)
public void removeAttribute(java.lang.String name) throws org.w3c.dom.DOMException
removeAttribute
in interface org.w3c.dom.Element
org.w3c.dom.DOMException
- thrown if the element is read-only.removeAttributeNode(org.w3c.dom.Attr)
public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr attr) throws org.w3c.dom.DOMException
removeAttributeNode
in interface org.w3c.dom.Element
org.w3c.dom.DOMException
- thrown if the given attribute cannot be
removed.public void setAttribute(java.lang.String name, java.lang.String value) throws org.w3c.dom.DOMException
setAttribute
in interface org.w3c.dom.Element
name
- the attribute name.value
- the attribute value.org.w3c.dom.DOMException
- thrown if the attribute cannot be set.setAttributeNode(org.w3c.dom.Attr)
public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr attr) throws org.w3c.dom.DOMException
setAttributeNode
in interface org.w3c.dom.Element
attr
- the attribute.org.w3c.dom.DOMException
- thrown if the attribute cannot be set.public void normalize()
normalize
in interface org.w3c.dom.Element
DocumentImpl.normalize(org.w3c.dom.Node)
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |