javanet.staxutils.events
public class AttributeEvent extends AbstractXMLEvent implements Attribute
Attribute
event implementation.location, schemaType
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
Constructor and Description |
---|
AttributeEvent(Attribute that)
Copy constructor.
|
AttributeEvent(QName name,
String value)
Constructs an
AttributeEvent with the specified name and value. |
AttributeEvent(QName name,
String value,
Attribute that)
Copy constructor that optionally allows the name and/or value to be changed.
|
AttributeEvent(QName name,
String value,
boolean specified)
Constructs a new
AttributeEvent . |
AttributeEvent(QName name,
String value,
boolean specified,
String dtdType,
Location location,
QName schemaType)
Constructs a new
AttributeEvent . |
AttributeEvent(QName name,
String value,
Location location)
Constructs a new
AttributeEvent . |
AttributeEvent(QName name,
String value,
Location location,
QName schemaType)
Constructs a new
AttributeEvent . |
Modifier and Type | Method and Description |
---|---|
String |
getDTDType() |
int |
getEventType()
Returns
XMLStreamConstants.ATTRIBUTE . |
QName |
getName() |
String |
getValue() |
boolean |
isSpecified() |
asCharacters, asEndElement, asStartElement, clone, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, matches, toString, writeAsEncodedUnicode, writeEvent
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode
public AttributeEvent(QName name, String value)
AttributeEvent
with the specified name and value.name
- The qualified attribute name.value
- The attribute value.public AttributeEvent(QName name, String value, boolean specified)
AttributeEvent
.name
- The qualified attribute name.value
- The attribute value.specified
- Whether the attribute was specified in the document
(true
false).public AttributeEvent(QName name, String value, Location location)
AttributeEvent
.name
- The qualified attribute name.value
- The attribute value.location
- The Location
of the attribute.public AttributeEvent(QName name, String value, Location location, QName schemaType)
AttributeEvent
.name
- The qualified attribute name.value
- The attribute value.location
- The Location
of the attribute.schemaType
- The attribute type as specified in the schema.public AttributeEvent(QName name, String value, boolean specified, String dtdType, Location location, QName schemaType)
AttributeEvent
.name
- The qualified attribute name.value
- The attribute value.specified
- Whether the attribute was specified in the document
(true
false).location
- The Location
of the attribute.dtdType
- The attribute type as specified in the DTD.schemaType
- The attribute type as specified in the schema.public AttributeEvent(QName name, String value, Attribute that)
name
- The new attribute name, or null
to use the name from
the provided attribute.value
- The new attribute value, or null
to use the value
from the provided attribute.that
- The Attribute
event to copy.public int getEventType()
XMLStreamConstants.ATTRIBUTE
.getEventType
in interface XMLEvent
public boolean isSpecified()
isSpecified
in interface Attribute
public String getDTDType()
getDTDType
in interface Attribute