@DOMObjectAttribute @DOMNameAttribute(name="Attr") public class Attr extends Node
The Attr interface represents an attribute in an Element object. Typically the allowable values for the attribute are defined in a schema associated with the document.
Node.Flags
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, flags, nodeDocument, NOTATION_NODE, parent, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
EventMap
PropertyChanged, PropertyChangedDelegate
Constructor and Description |
---|
Attr(com.aspose.html.dom.DOMName name,
Document doc)
Initializes a new instance of the
Attr class. |
Modifier and Type | Method and Description |
---|---|
static void |
change(Attr attr,
Element element,
java.lang.String value) |
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.
|
int |
getNodeType()
A code representing the type of the underlying object.
|
java.lang.String |
getNodeValue()
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.
|
java.lang.String |
getPrefix()
The namespace prefix of this node, or null if it is unspecified.
|
TypeInfo |
getSchemaTypeInfo()
The type information associated with this attribute.
|
boolean |
getSpecified()
True if this attribute was explicitly given a value in the instance document, false otherwise.
|
java.lang.String |
getTextContent()
This attribute returns the text content of this node and its descendants.
|
java.lang.String |
getValue()
On retrieval, the value of the attribute is returned as a string.
|
boolean |
isId()
Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not.
|
void |
setId(boolean value)
Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not.
|
protected void |
setLocalName(java.lang.String value)
Returns the local part of the qualified name of this node.
|
protected void |
setNamespaceURI(java.lang.String value)
The namespace URI of this node, or null if it is unspecified.
|
void |
setNodeValue(java.lang.String value)
The value of this node, depending on its type.
|
void |
setOwnerElement(Element value)
The Element node this attribute is attached to or null if this attribute is not in use.
|
void |
setTextContent(java.lang.String value)
This attribute returns the text content of this node and its descendants.
|
static void |
setValue(Element element,
Attr attr,
java.lang.String value) |
void |
setValue(java.lang.String value)
On retrieval, the value of the attribute is returned as a string.
|
adoptNode, appendChild, cloneNode, deepClone, dispose, finalize, getAttributes, getBaseURI, getChildNodes, getChildNodesInternal, getFirstChild, getLastChild, getNextSibling, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, getRegisteredObservers, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceAll, replaceChild, setParentNode, setPrefix, toString
addEventListener, addEventListener, addEventListener, addEventListener, dispatchEvent, dispose, removeEventListener, removeEventListener, removeEventListener
fireNotifyPropertyChanged, getCurrentValues, getRuntimesBinding, setCurrentValues, setField, setRuntimesBinding
@DOMNameAttribute(name="name") public java.lang.String getName()
Returns the name of this attribute.
@DOMNameAttribute(name="specified") public boolean getSpecified()
True if this attribute was explicitly given a value in the instance document, false otherwise.
Value:true
if specified; otherwise, false
.@DOMNameAttribute(name="value") public java.lang.String getValue()
On retrieval, the value of the attribute is returned as a string.
Value: The value.@DOMNameAttribute(name="value") public void setValue(java.lang.String value)
On retrieval, the value of the attribute is returned as a string.
Value: The value.@DOMNameAttribute(name="ownerElement") public Element getOwnerElement()
The Element node this attribute is attached to or null if this attribute is not in use.
@DOMNameAttribute(name="ownerElement") public void setOwnerElement(Element value)
The Element node this attribute is attached to or null if this attribute is not in use.
@DOMNameAttribute(name="schemaTypeInfo") public TypeInfo getSchemaTypeInfo()
The type information associated with this attribute.
@DOMNameAttribute(name="isId") public boolean isId()
Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not.
Value:true
if this instance is id; otherwise, false
.@DOMNameAttribute(name="isId") public void setId(boolean value)
Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not.
Value:true
if this instance is id; otherwise, false
.public java.lang.String getNodeName()
The name of this node, depending on its type.
Value: The name of the node.getNodeName
in class Node
public java.lang.String getNodeValue()
The value of this node, depending on its type.
Value: The node value.getNodeValue
in class Node
public void setNodeValue(java.lang.String value)
The value of this node, depending on its type.
Value: The node value.setNodeValue
in class Node
public java.lang.String getTextContent()
This attribute returns the text content of this node and its descendants. When it is defined to be null, setting it has no effect. On setting, any possible children this node may have are removed and, if it the new string is not empty or null, replaced by a single Text node containing the string this attribute is set to.
Value: The content of the text.getTextContent
in class Node
public void setTextContent(java.lang.String value)
This attribute returns the text content of this node and its descendants. When it is defined to be null, setting it has no effect. On setting, any possible children this node may have are removed and, if it the new string is not empty or null, replaced by a single Text node containing the string this attribute is set to.
Value: The content of the text.setTextContent
in class Node
public java.lang.String getLocalName()
Returns the local part of the qualified name of this node. For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement(), this is always null.
Value: The name of the local.getLocalName
in class Node
protected void setLocalName(java.lang.String value)
Returns the local part of the qualified name of this node. For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement(), this is always null.
Value: The name of the local.setLocalName
in class Node
public java.lang.String getNamespaceURI()
The namespace URI of this node, or null if it is unspecified.
getNamespaceURI
in class Node
protected void setNamespaceURI(java.lang.String value)
The namespace URI of this node, or null if it is unspecified.
setNamespaceURI
in class Node
public java.lang.String getPrefix()
The namespace prefix of this node, or null if it is unspecified. When it is defined to be null, setting it has no effect
Value: The prefix.public int getNodeType()
A code representing the type of the underlying object.
Value: The type of the node.getNodeType
in class Node