|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.xml.QAbstractNode | +--com.caucho.xml.QNode | +--com.caucho.xml.QAttr
Fields inherited from class com.caucho.xml.QAbstractNode |
L |
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 |
Method Summary | |
java.lang.String |
getCanonicalName()
Returns the node's canonical name. |
java.lang.String |
getLocalName()
Returns the local part of the qualified name of this node. |
java.lang.String |
getName()
Returns the name of this attribute. |
java.lang.String |
getNamespaceURI()
The namespace URI of this node, or null if it is
unspecified. |
java.lang.String |
getNodeName()
The name of this node, depending on its type; see the table above. |
short |
getNodeType()
A code representing the type of the underlying object, as defined above. |
java.lang.String |
getNodeValue()
The value of this node, depending on its type; see the table above. |
Element |
getOwnerElement()
The Element node this attribute is attached to or
null if this attribute is not in use. |
java.lang.String |
getPrefix()
The namespace prefix of this node, or null if it is
unspecified. |
boolean |
getSpecified()
If this attribute was explicitly given a value in the original document, this is true ; otherwise, it is
false . |
java.lang.String |
getValue()
On retrieval, the value of the attribute is returned as a string. |
void |
print(XmlPrinter out)
|
void |
setNodeValue(java.lang.String value)
The value of this node, depending on its type; see the table above. |
void |
setSpecified(boolean specified)
|
void |
setValue(java.lang.String value)
On retrieval, the value of the attribute is returned as a string. |
java.lang.String |
toString()
|
Methods inherited from class com.caucho.xml.QNode |
appendChild, checkValid, equals, equals, getAttributes, getChildNodes, getFirstChild, getLastChild, getLength, getNextPreorder, getNextSibling, getPreviousSibling, hasChildNodes, insertBefore, item, normalize, removeChild, replaceChild |
Methods inherited from class com.caucho.xml.QAbstractNode |
cloneNode, getColumn, getFilename, getLine, getNextContent, getOwnerDocument, getParentNode, getPreviousContent, getTextValue, hasAttributes, hasContent, isSupported, print, printHtml, printPretty, setLocation, setPrefix, supports |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNextSibling, getOwnerDocument, getParentNode, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setPrefix |
Method Detail |
public Element getOwnerElement()
Attr
Element
node this attribute is attached to or
null
if this attribute is not in use.getOwnerElement
in interface Attr
public short getNodeType()
Node
getNodeType
in interface Node
public java.lang.String getNodeName()
Node
getNodeName
in interface Node
public java.lang.String getName()
Attr
getName
in interface Attr
public java.lang.String getPrefix()
Node
null
if it is
unspecified.
nodeName
attribute, which holds the qualified name, as
well as the tagName
and name
attributes of
the Element
and Attr
interfaces, when
applicable.
namespaceURI
and localName
do not change.
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
.getPrefix
in interface Node
getPrefix
in class QAbstractNode
org.w3c.dom.Node
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
illegal character, per the XML 1.0 specification .
prefix
is
malformed per the Namespaces in XML specification, if the
namespaceURI
of this node is null
, if the
specified prefix is "xml" and the namespaceURI
of this
node is different from "http://www.w3.org/XML/1998/namespace", if
this node is an attribute and the specified prefix is "xmlns" and
the namespaceURI
of this node is different from "
http://www.w3.org/2000/xmlns/", or if this node is an attribute and
the qualifiedName
of this node is "xmlns" .public java.lang.String getLocalName()
Node
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
.getLocalName
in interface Node
getLocalName
in class QAbstractNode
public java.lang.String getCanonicalName()
CauchoNode
e.g. for foo:bar:baz, the prefix name might be '{/caucho/1.0}baz'
getCanonicalName
in class QAbstractNode
public java.lang.String getNamespaceURI()
Node
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.getNamespaceURI
in interface Node
getNamespaceURI
in class QAbstractNode
public java.lang.String getNodeValue()
Node
null
, setting it has no effect.getNodeValue
in interface Node
getNodeValue
in class QNode
org.w3c.dom.Node
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException
- DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString
variable on the implementation
platform.public void setNodeValue(java.lang.String value)
Node
null
, setting it has no effect.setNodeValue
in interface Node
setNodeValue
in class QNode
org.w3c.dom.Node
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException
- DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString
variable on the implementation
platform.public java.lang.String getValue()
Attr
getAttribute
on the
Element
interface.
Text
node with the unparsed
contents of the string. I.e. any characters that an XML processor
would recognize as markup are instead treated as literal text. See
also the method setAttribute
on the Element
interface.getValue
in interface Attr
org.w3c.dom.Attr
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.public void setValue(java.lang.String value)
Attr
getAttribute
on the
Element
interface.
Text
node with the unparsed
contents of the string. I.e. any characters that an XML processor
would recognize as markup are instead treated as literal text. See
also the method setAttribute
on the Element
interface.setValue
in interface Attr
org.w3c.dom.Attr
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.public boolean getSpecified()
Attr
true
; otherwise, it is
false
. Note that the implementation is in charge of this
attribute, not the user. If the user changes the value of the
attribute (even if it ends up having the same value as the default
value) then the specified
flag is automatically flipped
to true
. To re-specify the attribute as the default
value from the DTD, the user must delete the attribute. The
implementation will then make a new attribute available with
specified
set to false
and the default
value (if one exists).
specified
is true
, and the value is
the assigned value.If the attribute has no assigned value in the
document and has a default value in the DTD, then
specified
is false
, and the value is the
default value in the DTD.If the attribute has no assigned value in
the document and has a value of #IMPLIED in the DTD, then the
attribute does not appear in the structure model of the document.If
the ownerElement
attribute is null
(i.e.
because it was just created or was set to null
by the
various removal and cloning operations) specified
is
true
.getSpecified
in interface Attr
public void setSpecified(boolean specified)
public void print(XmlPrinter out) throws java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |