Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----com.ibm.xml.parser.Child | +----com.ibm.xml.parser.TXAttribute
Attribute Nodes represent an attribute in an Element object; in other words, an attribute name and an attribute object. Typically the allowable values for the attribute are defined in a document type definition.
The attribute's effective value is determined as follows: if the attribute has been explicitly assigned any value, that value is the attribute's effective value. Otherwise, if there is a declaration for this attribute, and that declaration includes a default value, then that default value is the attribute's effective value. Otherwise, the attribute has no effective value.
In XML, the value of an attribute is represented by a list because the value can be an arbitrarily complex list of entity references.
Fields inherited from class com.ibm.xml.parser.Child |
ATTDEF, ATTLIST, DOCUMENTTYPE, ELEMENTDEFINITION, ENTITY, GENERALREFERENCE, NOTATION, PSEUDONODE |
Constructor Summary | |
TXAttribute(java.lang.String name,
java.lang.String value)
|
Method Summary | |
java.lang.Object | clone()
|
boolean | equals(java.lang.Object object)
|
java.lang.String | getName()
|
int | getNodeType()
|
java.lang.String | getNSLocalName()
|
java.lang.String | getNSName()
|
boolean | getSpecified()
|
java.lang.String | getText()
name="value" format,
and using the default character encoding.
|
int | getType()
|
java.lang.String[] | getTypedValue()
|
java.lang.String | getUniversalName()
getNSName()+":"+getNSLocalName() ; otherwise, return getNSLocalName() .
|
java.lang.String | getValue()
|
void | setNSLocalName(java.lang.String nsLocalName)
|
void | setNSName(java.lang.String nsURI)
|
void | setSpecified(boolean specified)
|
void | setType(int type,
java.lang.String[] typedValue)
|
void | setValue(java.lang.String value)
|
java.lang.String | toXMLString()
name="value" format,
and using the default character encoding.
|
java.lang.String | toXMLString(java.lang.String enc)
name="value" format,
and using the specified character encoding.
|
Methods inherited from class com.ibm.xml.parser.Child |
clearDigest, clone, getChildNodes, getDigest, getFactory, getFirstChild, getNextSibling, getParentNode, getPreviousSibling, getText, hasChildNodes, insertBefore, makeXPointer, print, print, removeChild, replaceChild, searchAncestors, searchAncestors, setFactory, toString, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TXAttribute(java.lang.String name, java.lang.String value)
name
- The name of this Attribute.
data
- The string value of this Attribute.
Method Detail |
public java.lang.Object clone()
This method is defined by Child.
public int getNodeType()
This method is defined by DOM.
public java.lang.String getName()
This method is defined by DOM.
public java.lang.String getValue()
This method is defined by DOM.
public void setValue(java.lang.String value)
value
- The value of this Attribute.
public boolean getSpecified()
public void setSpecified(boolean specified)
specified
- =true if value explicitly defined; otherwise, false.
public java.lang.String getNSLocalName()
This method is defined by Namespace.
public void setNSLocalName(java.lang.String nsLocalName)
This method is defined by Namespace.
nsLocalName
- The Namespace local name.
public java.lang.String getNSName()
This method is defined by Namespace.
public void setNSName(java.lang.String nsURI)
This method is defined by Namespace.
nsURI
- The Namespace URI, or null if no name.
public java.lang.String getUniversalName()
getNSName()+":"+getNSLocalName()
; otherwise, return getNSLocalName()
.public int getType()
public java.lang.String[] getTypedValue()
getTypeValue()[0] = getValue()
when getType() = CDATA, NOTATION, ID, IDREF, ENTITY, NMTOKEN
;
otherwise, multiple values are returned.public void setType(int type, java.lang.String[] typedValue)
type
- The Attribute type as defined by AttDef.Java.
typedValue
- getTypeValue()[0] = getValue()
when getType() = CDATA, NOTATION, ID, IDREF, ENTITY, NMTOKEN
;
otherwise, multiple values are returned.
public java.lang.String toXMLString()
name="value"
format,
and using the default character encoding.
Entities embedded in the returned string will be respected.
For example, the characters <, >, &, ', and "
will be represented as <, >, &, ', "
.name="value"
.public java.lang.String toXMLString(java.lang.String enc)
name="value"
format,
and using the specified character encoding.
Entities embedded in the returned string will be respected.
For example, the characters <, >, &, ', and "
will be represented as <, >, &, ', "
.
enc
- Java character encoding to use.
name="value"
.public java.lang.String getText()
name="value"
format,
and using the default character encoding.
Entities embedded in the returned string will be respected.
For example, the characters <, >, &, ', and "
will be represented as <, >, &, ', "
.name="value"
.public boolean equals(java.lang.Object object)
Contents | Package | Class | Tree | Deprecated | Index | Help | |||
PREV | NEXT | SHOW LISTS | HIDE LISTS |