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
-
XMLAttr(String, String)
- Construct attribute with given name and value.
-
XMLAttr(String, String, String, String)
- Namespace support
-
cloneNode(boolean)
- Returns a duplicate of this node, i.e., serves as a generic copy
constructor for nodes.
-
getExpandedName()
- Get the fully resolved Name for this attribute
-
getLocalName()
- Get the local Name for this attribute
-
getName()
- Gets the attribute name.
-
getNamespace()
- Get the resolved Namespace for this attribute
-
getNodeValue()
- Gets the value of this node, depending on its type
-
getParentNode()
- Gets the parent of this node.
-
getPrefix()
- Get the namespace prefix for this attribute
-
getQualifiedName()
- Gets the qualified name for this attribute
-
getSpecified()
- Returns true if the attribute was specified explicity in the element
-
getValue()
- Gets the attribute value.
-
setNodeValue(String)
- Sets the value of this node, depending on its type
-
setValue(String)
- Sets the value.
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
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
getName
public String getName()
- Gets the attribute name.
- Returns:
- attribute name
getQualifiedName
public String getQualifiedName()
- Gets the qualified name for this attribute
- Returns:
- the qualified name
getNamespace
public String getNamespace()
- Get the resolved Namespace for this attribute
- Returns:
- the resolved Namespace
getLocalName
public String getLocalName()
- Get the local Name for this attribute
- Returns:
- the local Name
getPrefix
public String getPrefix()
- Get the namespace prefix for this attribute
- Returns:
- the namespace prefix
getExpandedName
public String getExpandedName()
- Get the fully resolved Name for this attribute
- Returns:
- the fully resolved Name
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
getValue
public String getValue()
- Gets the attribute value.
- Returns:
- attribute value
setValue
public void setValue(String arg)
- Sets the value.
- Parameters:
- arg - Value to set
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
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
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
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