|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.xml.parser.v2.XMLNode | +--oracle.xml.parser.v2.XMLNSNode | +--oracle.xml.parser.v2.XMLAttr
This class implements the DOM Attr interface and holds information on each attribute of an element.
Attr
,
NodeFactory
,
DOMParser.setNodeFactory(oracle.xml.parser.v2.NodeFactory)
, Serialized FormFields inherited from interface oracle.xml.comp.CXMLConstants |
ATTR_DEF,
ATTR_TOKEN,
ATTRDECL_DEF,
CDATA_DEF,
CHAR_DEF,
COMMENT_DEF,
CXML_VERSION,
cXMLFILE,
cXMLFILE_LEN,
DEBUG,
DTD_DEF,
ELEMENTDECL_DEF,
END,
ENTITY_DEF,
ENTITYREF_DEF,
META_ID_MAX,
names,
NOTATION_DEF,
NS_DEF,
NULLSTR,
PI_DEF,
PREFIX_DEF,
TAG_DEF,
TAG_TOKEN,
TOKEN_ONLY,
XMLDECL_DEF |
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 |
XMLAttr()
Deprecated. use createAttribute(String) or createAttributeNS(String, String) of XMLDocument |
XMLAttr(java.lang.String n,
java.lang.String v)
Deprecated. use createAttribute(String) method of XMLDocument |
XMLAttr(java.lang.String name,
java.lang.String prefix,
java.lang.String namespace,
java.lang.String v)
Deprecated. use createAttributeNS(String, String) method of XMLDocument |
XMLAttr(java.lang.String name,
java.lang.String prefix,
java.lang.String namespace,
java.lang.String v,
boolean isLevelTwo)
|
XMLAttr(java.lang.String name,
java.lang.String prefix,
java.lang.String qname,
java.lang.String namespace,
java.lang.String v)
Deprecated. use crateAttribute(String) or createAttributeNS(String, String) of XMLDocument |
Method Summary |
Type | Method |
---|---|
XMLNode |
addText(java.lang.String str)
Adds text to this node, or appends str to the last child if the last child is a text node. |
Node |
cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. |
java.lang.String |
getExpandedName()
Get the fully resolved Name for this attribute |
java.lang.String |
getLocalName()
gets the local name of this attribute |
java.lang.String |
getName()
Gets the attribute name. |
java.lang.String |
getNamespace()
Deprecated. As of DOM 2 |
java.lang.String |
getNamespaceURI()
The namespace URI of this node, or null if it is
unspecified. |
XMLAttr |
getNextAttribute()
returns the next attribute if any |
Node |
getNextSibling()
The node immediately following this node. |
short |
getNodeType()
Gets a code representing the type of the underlying object |
java.lang.String |
getNodeValue()
Gets the value of this node, depending on its type |
Element |
getOwnerElement()
The Element node this attribute is attached to or
null if this attribute is not in use. |
Node |
getParentNode()
Gets the parent of this node. |
java.lang.String |
getPrefix()
gets the name space prefix of the element |
Node |
getPreviousSibling()
The node immediately preceding this node. |
java.lang.String |
getQualifiedName()
Gets the qualified name for this attribute |
boolean |
getSpecified()
Returns true if the attribute was specified explicity in the element |
java.lang.String |
getValue()
Gets the attribute value. |
void |
readExternal(java.io.ObjectInput inArg)
This method restores the information written by writeExternal. |
void |
readExternal(oracle.xml.io.XMLObjectInput in,
oracle.xml.comp.CXMLContext cxmlContext)
This method reads the attribute information from the compressed stream |
void |
setNodeValue(java.lang.String nodeValue)
Sets the value of this node, depending on its type |
void |
setPrefix(java.lang.String p)
Sets the prefix of this node |
void |
setValue(java.lang.String arg)
Sets the value. |
void |
writeExternal(java.io.ObjectOutput outArg)
This method saves the state of the object. |
Methods inherited from class oracle.xml.parser.v2.XMLNSNode |
addText,
appendChild,
getChildNodes,
getFirstChild,
getLastChild,
getNodeLocalName,
getNodeName,
getNodePrefix,
getText,
hasChildNodes,
insertBefore,
normalize,
removeChild,
replaceChild |
Methods inherited from class oracle.xml.parser.v2.XMLNode |
addEventListener,
dispatchEvent,
getAttributes,
getColumnNumber,
getDebugMode,
getLineNumber,
getOwnerDocument,
getProperty,
getSystemId,
hasAttributes,
isNodeFlag,
isSupported,
print,
print,
print,
readChildNodes,
removeEventListener,
reportSAXEvents,
resetNodeFlag,
selectNodes,
selectNodes,
selectNodes,
selectSingleNode,
selectSingleNode,
setDebugInfo,
setNodeFlag,
setProperty,
supports,
transformNode,
valueOf,
valueOf |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public XMLAttr()
public XMLAttr(java.lang.String n, java.lang.String v)
n
- Name of the attributev
- Value of the attributepublic XMLAttr(java.lang.String name, java.lang.String prefix, java.lang.String namespace, java.lang.String v)
name
- Local name of the attributeprefix
- Prefix of the attributenamespace
- Namespace of the attributev
- Value of the attributepublic XMLAttr(java.lang.String name, java.lang.String prefix, java.lang.String namespace, java.lang.String v, boolean isLevelTwo)
public XMLAttr(java.lang.String name, java.lang.String prefix, java.lang.String qname, java.lang.String namespace, java.lang.String v)
name
- Local name of the attributeprefix
- Prefix of the attributeQname
- Qname of the attributenamespace
- Namespace of the attributev
- Value of the attributeMethod Detail |
public short getNodeType()
public java.lang.String getName()
public java.lang.String getQualifiedName()
public java.lang.String getNamespace()
getNamespaceURI()
public java.lang.String getNamespaceURI()
null
if it is
unspecified.
ELEMENT_NODE
and
ATTRIBUTE_NODE
and nodes created with a DOM Level 1
method, such as createElement
from the
Document
interface, this is always null
.Per
the Namespaces in XML Specification an attribute does not inherit
its namespace from the element it is attached to. If an attribute is
not explicitly given a namespace, it simply has no namespace.public java.lang.String getLocalName()
public java.lang.String getPrefix()
public void setPrefix(java.lang.String p)
p
- Sets the prefix of the nodepublic java.lang.String getExpandedName()
public java.lang.String getNodeValue() throws DOMException
DOMString
variable on the implementation
platform.public java.lang.String getValue()
public void setValue(java.lang.String arg) throws DOMException
arg
- Value to setpublic Node getParentNode()
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
.public XMLAttr getNextAttribute()
public Element getOwnerElement()
Element
node this attribute is attached to or
null
if this attribute is not in use.public boolean getSpecified()
true
, if the attribute was specified explicitly,
false
, if it was notpublic void setNodeValue(java.lang.String nodeValue) throws DOMException
DOMString
variable on the implementation
platform.public Node cloneNode(boolean deep)
parentNode
returns null
.).
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.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
).public XMLNode addText(java.lang.String str)
str
- text to addpublic Node getNextSibling()
null
.public Node getPreviousSibling()
null
.public void writeExternal(java.io.ObjectOutput outArg) throws java.io.IOException
out
- The ObjectOutput stream used to write the compressed
streampublic void readExternal(java.io.ObjectInput inArg) throws java.io.IOException, java.lang.ClassNotFoundException
in
- is the ObjectInput stream used to read the compressed
streampublic void readExternal(oracle.xml.io.XMLObjectInput in, oracle.xml.comp.CXMLContext cxmlContext) throws java.io.IOException, java.lang.ClassNotFoundException
in
- is the XMLObjectInput stream used to read the compressed
stream
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |