org.exolab.adaptx.xslt.dom
Class Element
- java.io.Serializable
public class Element
extends org.exolab.adaptx.xslt.dom.ParentNode
A representation of an Element node
$Revision: 3633 $ $Date: 2003-03-01 02:38:44 -0500 (Sat, 01 Mar 2003) $
Element(String namespace, String localName) - Creates a new Element
|
void | addAttribute(Attribute attr) - Adds the given Attribute to this Element
|
void | addNamespace(Namespace namespace) - Adds the given Attribute to this Element
|
String | getAttribute(String uri, String localName) - Returns the value of the named attribute, or null if the
node has no such attribute.
|
XPathNode | getFirstAttribute() - Returns the first in a list of attribute nodes, or null
if the node has no attributes.
|
XPathNode | getFirstNamespace() - Returns the first in a list of namespace nodes, or null
if the node has no namespaces.
|
String | getNamespacePrefix(String uri) - Returns the namespace prefix associated with this namespace URI,
as defined in the context of this node.
|
String | getNamespaceURI(String prefix) - Returns the namespace URI associated with this namespace prefix,
as defined in the context of this node.
|
int | getNodeType() - Returns the type of this node.
|
getAttribute , getFirstAttribute , getFirstChild , getFirstNamespace , getLocalName , getNamespacePrefix , getNamespaceURI , getNamespaceURI , getNext , getNodeType , getParentNode , getPrevious , getProperty , getRootNode , getStringValue , hasChildNodes , setProperty |
getAttribute , getFirstAttribute , getFirstChild , getFirstNamespace , getLocalName , getNamespacePrefix , getNamespaceURI , getNamespaceURI , getNext , getNodeType , getParentNode , getPrevious , getRootNode , getStringValue , hasChildNodes |
Element
public Element(String namespace,
String localName)
Creates a new Element
namespace
- the namespace URI for this node. [May be null]localName
- the local-name of this node. [Cannot be null]
addAttribute
public void addAttribute(Attribute attr)
Adds the given Attribute to this Element
attr
- the Attribute to add
addNamespace
public void addNamespace(Namespace namespace)
Adds the given Attribute to this Element
getAttribute
public String getAttribute(String uri,
String localName)
Returns the value of the named attribute, or null if the
node has no such attribute. If the argument uri
is null, the node's namespace URI will be used. This method
is valid only for the element node.
- getAttribute in interface org.exolab.adaptx.xslt.dom.BaseNode
uri
- The attribute's namespace URI, or nulllocalName
- The attribute's local name
- The attribute's value, or null if no such attribute exists
getFirstAttribute
public XPathNode getFirstAttribute()
Returns the first in a list of attribute nodes, or null
if the node has no attributes. This method is valid only
for the element node.
- getFirstAttribute in interface org.exolab.adaptx.xslt.dom.BaseNode
- The first in a list of attribute nodes, or null
getFirstNamespace
public XPathNode getFirstNamespace()
Returns the first in a list of namespace nodes, or null
if the node has no namespaces. This method is valid only
for the element node.
- getFirstNamespace in interface org.exolab.adaptx.xslt.dom.BaseNode
- The first in a list of namespace nodes, or null
getNamespacePrefix
public String getNamespacePrefix(String uri)
Returns the namespace prefix associated with this namespace URI,
as defined in the context of this node. Returns null if no prefix
is defined for this namespace URI. Returns an empty string if the
default prefix is associated with this namespace URI. This method
is valid only for element nodes.
- getNamespacePrefix in interface org.exolab.adaptx.xslt.dom.BaseNode
- The namespace prefix, or null
getNamespaceURI
public String getNamespaceURI(String prefix)
Returns the namespace URI associated with this namespace prefix,
as defined in the context of this node. Returns null if the prefix
is undefined. Returns empty if the prefix is defined and associated
with no namespace. This method is valid only for element nodes.
- getNamespaceURI in interface org.exolab.adaptx.xslt.dom.BaseNode
prefix
- The namespace prefix
- The namespace URI, or null
getNodeType
public int getNodeType()
Returns the type of this node.
- getNodeType in interface org.exolab.adaptx.xslt.dom.BaseNode