|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.xml.dom.XPNode com.plumtree.openfoundation.xml.dom.XPElement
The XPElement
class is a wrapper for objects implementing
org.w3c.dom.Element
interface.
Please refer to Element (Java 2 Platform SE v1.4.2)
for detail information.
Field Summary |
Fields inherited from class com.plumtree.openfoundation.xml.dom.XPNode |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
protected |
XPElement(org.w3c.dom.Element currElem)
Creates a new XPElement object. |
Method Summary | |
java.lang.String |
GetAttribute(java.lang.String name)
Retrieves an attribute value by name. |
XPAttr |
GetAttributeNode(java.lang.String name)
Retrieves an attribute node by name. |
XPAttr |
GetAttributeNodeNS(java.lang.String namespaceURI,
java.lang.String localName)
Retrieves a XPAttr node by local name and namespace URI. |
java.lang.String |
GetAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
Retrieves an attribute value by local name and namespace URI. |
XPNodeList |
GetElementsByTagName(java.lang.String name)
Returns a XPNodeList of all descendant XPElement s
with a given tag name, in the order in which they are encountered in a
preorder traversal of this XPElement tree. |
XPNodeList |
GetElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
Returns a XPNodeList of all the descendant XPElement s
with a given local name and namespace URI in the order in which they are
encountered in a preorder traversal of this XPElement tree. |
java.lang.String |
GetTagName()
The name of the element. |
org.w3c.dom.Node |
GetUnderlyingObject()
Retrieve the underlying org.w3c.dom.Node object. |
boolean |
HasAttribute(java.lang.String name)
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 namespaceURI,
java.lang.String localName)
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. |
void |
RemoveAttributeNode(java.lang.String name)
Removes the specified attribute node. |
void |
RemoveAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
Removes an attribute by local name and namespace URI. |
void |
SetAttribute(java.lang.String name,
java.lang.String value)
Adds a new attribute. |
XPAttr |
SetAttributeNode(XPAttr newAttr)
Adds a new attribute node. |
XPAttr |
SetAttributeNodeNS(XPAttr newAttr)
Adds a new attribute. |
void |
SetAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName,
java.lang.String newValue)
Adds a new attribute. |
Methods inherited from class com.plumtree.openfoundation.xml.dom.XPNode |
AppendChild, CloneNode, GetAttributes, GetChildNodes, GetFirstChild, GetLastChild, GetLocalName, GetNamespaceURI, GetNextSibling, GetNodeName, GetNodeType, GetNodeValue, GetOwnerDocument, GetParentNode, GetPrefix, GetPreviousSibling, HasAttributes, HasChildNodes, InsertBefore, IsAttributeNode, IsCDATASectionNode, IsCommentNode, IsDocumentFragmentNode, IsDocumentNode, IsDocumentTypeNode, IsElementNode, IsProcessingInstructionNode, IsSupported, IsTextNode, Normalize, RemoveChild, ReplaceChild, SetNodeValue, SetPrefix, StoreNode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected XPElement(org.w3c.dom.Element currElem)
currElem
- - underlying element nodeMethod Detail |
public java.lang.String GetAttribute(java.lang.String name)
name
- - attribute name to be searched
public java.lang.String GetAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
namespaceURI
- - namespace in which to looklocalName
- - name of desired attribute
public XPAttr GetAttributeNode(java.lang.String name)
name
- - name of desired attribute
public XPAttr GetAttributeNodeNS(java.lang.String namespaceURI, java.lang.String localName)
XPAttr
node by local name and namespace URI.
namespaceURI
- - namespace of desired attributelocalName
- - name of desired attribute
public XPNodeList GetElementsByTagName(java.lang.String name)
XPNodeList
of all descendant XPElement
s
with a given tag name, in the order in which they are encountered in a
preorder traversal of this XPElement
tree.
name
- - name of desired element(s)
public XPNodeList GetElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
XPNodeList
of all the descendant XPElement
s
with a given local name and namespace URI in the order in which they are
encountered in a preorder traversal of this XPElement
tree.
namespaceURI
- - namespace of desired element(s)localName
- - name of desired element(s)
public java.lang.String GetTagName()
public org.w3c.dom.Node GetUnderlyingObject()
XPNode
org.w3c.dom.Node
object.
GetUnderlyingObject
in class XPNode
public boolean HasAttribute(java.lang.String name)
name
- - name of attr
public boolean HasAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
true
when an attribute with a given local name and
namespace URI is specified on this element or has a default value,
false
otherwise.
namespaceURI
- - namespace of attribute.localName
- - name of attribute.
true
if an attribute with the given local name and
namespace URI is specified or has a default value on this element, false
otherwise.public void RemoveAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
namespaceURI
- - namespace of attrlocalName
- - name of attrpublic void RemoveAttributeNode(java.lang.String name)
name
- - name of attribute to be removed.public void SetAttribute(java.lang.String name, java.lang.String value)
name
- - name of attrvalue
- - value of attrpublic void SetAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String newValue)
namespaceURI
- - namespace of attrqualifiedName
- - name of attrnewValue
- - value of attrpublic XPAttr SetAttributeNode(XPAttr newAttr)
newAttr
- - attr to be set
newAttr
.public XPAttr SetAttributeNodeNS(XPAttr newAttr)
newAttr
- - attr to be set
newAttr
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |