public class XMLAttr extends XMLNSNode implements Attr, NSName, java.io.Externalizable
ATTRDECL, Auto_Events, capturing, DOMAttrModified, DOMCharacterDataModified, DOMNodeInserted, DOMNodeInsertedIntoDocument, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMSubtreeModified, ELEMENTDECL, KEPT_NODE, NAMESPACE_NODE, noncapturing, RANGE_DELETE_EVENT, RANGE_DELETETEXT_EVENT, RANGE_INSERT_EVENT, RANGE_INSERTTEXT_EVENT, RANGE_REPLACE_EVENT, RANGE_SETTEXT_EVENT, TRAVERSAL_DELETE_EVENT, TRAVERSAL_REPLACE_EVENT, XMLDECL_NODEATTRIBUTE_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_NODEVAL_FALSE, VAL_INCOMPLETE, VAL_NS_WF, VAL_SCHEMA, VAL_TRUE, VAL_UNKNOWN, VAL_WF| Constructor and Description |
|---|
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 qname, java.lang.String namespace, java.lang.String v)
Deprecated.
use crateAttribute(String) or createAttributeNS(String, String) of XMLDocument
|
| Modifier and Type | Method and Description |
|---|---|
XMLNode |
addText(java.lang.String str)
Append the given value to the attribute value
|
short |
canRemoveChild(Node oldChild)
Determines whether the
Node.removeChild operation would make this document not compliant with the VAL_INCOMPLETE validity type. |
DOMStringList |
getEnumeratedValues()
A
DOMStringList, as described in [DOM Level 3 Core] , of distinct values for an attribute or an element declaration or null if unspecified. |
java.lang.String |
getExpandedName()
Gets the fully resolved Name for this attribute
|
Node |
getFirstChild()
Gets the first child of this node.
|
Node |
getLastChild()
Gets the last child of this node.
|
java.lang.String |
getLocalName()
Gets the Local Name of this node
|
java.lang.String |
getName()
Gets the attribute name.
|
java.lang.String |
getNamespaceURI()
Gets the namespace URI of this node.
|
XMLAttr |
getNextAttribute()
Gets the next attribute if any
|
Node |
getNextSibling()
Gets The node immediately following this node.
|
java.lang.String |
getNodeName()
Gets the name of this node, depending on its type
|
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()
Gets the element which owns this attribute
|
Node |
getParentNode()
Gets the parent of this node.
|
java.lang.String |
getPrefix()
Get the namespace prefix for this element.
|
XMLAttr |
getPrevAttribute()
Deprecated.
|
Node |
getPreviousSibling()
Gets the node immediately preceding this node.
|
java.lang.String |
getQualifiedName()
Gets the qualified name for this attribute
|
TypeInfo |
getSchemaTypeInfo()
The type information associated with this attribute.
|
boolean |
getSpecified()
Returns true if the attribute was specified explicity in the element
|
java.lang.String |
getText()
Gets the attribute value.
|
java.lang.String |
getUniqueId()
Override the method is XMLNode for SDOM
|
java.lang.String |
getValue()
Gets the attribute value.
|
void |
setNodeValue(java.lang.String nodeValue)
Sets the value of this node, depending on its type
|
void |
setPrefix(java.lang.String prefix)
Sets the prefix for attribute Note that setting the prefix, when permitted, changes the nodeName.
|
void |
setValue(java.lang.String arg)
Sets the value.
|
addText, appendChild, getChildNodes, insertBefore, normalize, removeChild, replaceChildaddEventListener, canAppendChild, canInsertBefore, canReplaceChild, cloneNode, dispatchEvent, equals, getAttributes, getColumnNumber, getDebugMode, getDefaultValue, getFirstChildAsOffset, getLineNumber, getNextSiblingAsOffset, getNodeValueAsBinaryStream, getNodeValueAsBinaryStream, getNodeValueAsCharacterStream, getNodeValueAsCharacterStream, getOwnerDocument, getPrimitiveTypeId, getProperty, getSystemId, getXMLError, hasAttributes, hasChildNodes, hashCode, isDocumentFlag, isNodeFlag, isSupported, nodeValidity, print, print, print, print, readExternal, removeEventListener, reportSAXEvents, resetNodeFlag, selectNodes, selectNodes, selectSingleNode, selectSingleNode, setDebugInfo, setNodeFlag, setNodeFlag, setNodeFlag, setNodeValueAsBinaryStream, setNodeValueAsBinaryStream, setNodeValueAsCharacterStream, setNodeValueAsCharacterStream, setProperty, transformNode, valueOf, valueOf, writeExternal, xdbGetNodeIdgetClass, notify, notifyAll, toString, wait, wait, waitappendChild, cloneNode, getAttributes, getChildNodes, getOwnerDocument, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChildgetNamespacepublic 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 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 attributepublic short getNodeType()
getNodeType in interface NodegetNodeType in class XMLNodepublic java.lang.String getNodeName()
getNodeName in interface NodegetNodeName in class XMLNodepublic java.lang.String getName()
public java.lang.String getLocalName()
getLocalName in interface NSNamegetLocalName in interface NodegetLocalName in class XMLNodepublic java.lang.String getNamespaceURI()
getNamespaceURI in interface NodegetNamespaceURI in class XMLNodepublic java.lang.String getPrefix()
public void setPrefix(java.lang.String prefix)
throws DOMException
setPrefix in interface NodesetPrefix in class XMLNodeprefix - Sets the prefix of the nodeDOMException - if any DOM Exception occurspublic final java.lang.String getText()
public java.lang.String getValue()
public java.lang.String getNodeValue()
throws DOMException
getNodeValue in interface NodegetNodeValue in class XMLNodeDOMException - 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.public void setValue(java.lang.String arg)
throws DOMException
setValue in interface Attrarg - Value to setDOMExceptionpublic void setNodeValue(java.lang.String nodeValue)
throws DOMException
setNodeValue in interface NodesetNodeValue in class XMLNodenodeValue - the value of thenode to be setDOMException - 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.public 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.getParentNode in interface NodegetParentNode in class XMLNodepublic Element getOwnerElement()
getOwnerElement in interface Attrpublic boolean getSpecified()
getSpecified in interface Attrtrue, if the attribute was specified explicitly, false, if it was notpublic Node getNextSibling()
null.getNextSibling in interface NodegetNextSibling in class XMLNodepublic Node getPreviousSibling()
null.getPreviousSibling in interface NodegetPreviousSibling in class XMLNodepublic TypeInfo getSchemaTypeInfo()
Document.normalizeDocument(), schemaTypeInfo may not be reliable if the node was moved.public short canRemoveChild(Node oldChild)
Node.removeChild operation would make this document not compliant with the VAL_INCOMPLETE validity type.canRemoveChild in interface NodeEditVALcanRemoveChild in class XMLNodeoldChild - Node to be removed.public DOMStringList getEnumeratedValues()
DOMStringList, as described in [DOM Level 3 Core] , of distinct values for an attribute or an element declaration or null if unspecified. If the schema is a W3C XML schema, this is a list of strings which are lexical representations corresponding to the values in the [value] property of the enumeration component for the type of the attribute or element. It is recommended that the canonical lexical representations of the values be used.getEnumeratedValues in interface NodeEditVALgetEnumeratedValues in class XMLNodepublic java.lang.String getQualifiedName()
getQualifiedName in interface NSNamepublic java.lang.String getExpandedName()
getExpandedName in interface NSNamepublic XMLAttr getNextAttribute()
public XMLNode addText(java.lang.String str)
public Node getFirstChild()
null.getFirstChild in interface NodegetFirstChild in class XMLNSNodepublic Node getLastChild()
null.getLastChild in interface NodegetLastChild in class XMLNSNodepublic java.lang.String getUniqueId()
getUniqueId in class XMLNodepublic XMLAttr getPrevAttribute()