All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oracle.xml.parser.v2.XMLAttr

java.lang.Object
   |
   +----oracle.xml.parser.v2.XMLNode
           |
           +----oracle.xml.parser.v2.XMLAttr

public class XMLAttr
extends XMLNode
implements Attr, NSName, Serializable
This class implements the DOM Attr interface and holds information on each attribute of an element.

See Also:
Attr, NodeFactory, setNodeFactory

Constructor Index

 o XMLAttr(String, String)
Construct attribute with given name and value.
 o XMLAttr(String, String, String, String)
Namespace support

Method Index

 o cloneNode(boolean)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
 o getExpandedName()
Get the fully resolved Name for this attribute
 o getLocalName()
Get the local Name for this attribute
 o getName()
Gets the attribute name.
 o getNamespace()
Get the resolved Namespace for this attribute
 o getNodeValue()
Gets the value of this node, depending on its type
 o getParentNode()
Gets the parent of this node.
 o getPrefix()
Get the namespace prefix for this attribute
 o getQualifiedName()
Gets the qualified name for this attribute
 o getSpecified()
Returns true if the attribute was specified explicity in the element
 o getValue()
Gets the attribute value.
 o setNodeValue(String)
Sets the value of this node, depending on its type
 o setValue(String)
Sets the value.

Constructors

 o XMLAttr
 public XMLAttr(String n,
                String v)
Construct attribute with given name and value.

Parameters:
n - Name of the attribute
v - Value of the attribute
 o XMLAttr
 public XMLAttr(String name,
                String prefix,
                String namespace,
                String v)
Namespace support

Parameters:
name - Local name of the attribute
prefix - Prefix of the attribute
namespace - Namespace of the attribute
v - Value of the attribute

Methods

 o getName
 public String getName()
Gets the attribute name.

Returns:
attribute name
 o getQualifiedName
 public String getQualifiedName()
Gets the qualified name for this attribute

Returns:
the qualified name
 o getNamespace
 public String getNamespace()
Get the resolved Namespace for this attribute

Returns:
the resolved Namespace
 o getLocalName
 public String getLocalName()
Get the local Name for this attribute

Returns:
the local Name
 o getPrefix
 public String getPrefix()
Get the namespace prefix for this attribute

Returns:
the namespace prefix
 o getExpandedName
 public String getExpandedName()
Get the fully resolved Name for this attribute

Returns:
the fully resolved Name
 o getNodeValue
 public String getNodeValue() throws DOMException
Gets the value of this node, depending on its type

Returns:
Value of this node
Throws: DOMException
NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.
Overrides:
getNodeValue in class XMLNode
 o getValue
 public String getValue()
Gets the attribute value.

Returns:
attribute value
 o setValue
 public void setValue(String arg)
Sets the value.

Parameters:
arg - Value to set
 o getParentNode
 public Node getParentNode()
Gets the parent of this node. All nodes, except Document, DocumentFragment, and Attr 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.

Returns:
The parent of this node
Overrides:
getParentNode in class XMLNode
 o getSpecified
 public boolean getSpecified()
Returns true if the attribute was specified explicity in the element

Returns:
true, if the attribute was specified explicitly, false, if it was not
 o setNodeValue
 public void setNodeValue(String nodeValue) throws DOMException
Sets the value of this node, depending on its type

Throws: DOMException
NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform.
Overrides:
setNodeValue in class XMLNode
 o cloneNode
 public Node cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent ( parentNode returns null.).
Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child Text node. Cloning any other type of node simply returns a copy of this 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.
Overrides:
cloneNode in class XMLNode

All Packages  Class Hierarchy  This Package  Previous  Next  Index