APIdia Launch Partner
Top Description Methods
javax.xml.stream.events

public Interface Attribute

extends XMLEvent
Known Direct Subinterfaces
javax.xml.stream.events.Namespace
Known Direct Implementers
com.sun.xml.internal.stream.events.AttributeImpl
Imports
javax.xml.namespace.QName

An interface that contains information about an attribute. Attributes are reported as a set of events accessible from a StartElement. Other applications may report Attributes as first-order events, for example as the results of an XPath expression.
Author
Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
Since
1.6
Version
1.0
See Also
StartElement

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the type as a String, default is "CDATA"
getDTDType
()

Gets the type of this attribute, default is the String "CDATA".

public QName

Returns:

the QName of the attribute
getName
()

Returns the QName for this attribute.

public String

Returns:

the normalized value of the attribute
getValue
()

Gets the normalized value of this attribute.

public boolean

Returns:

returns true if this was specified in the start element
isSpecified
()

A flag indicating whether this attribute was actually specified in the start-tag of its element, or was defaulted from the schema.

Inherited from javax.xml.stream.events.XMLEvent:
asCharactersasEndElementasStartElementgetEventTypegetLocationgetSchemaTypeisAttributeisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartDocumentisStartElementwriteAsEncodedUnicode

Method Detail

getDTDTypeback to summary
public String getDTDType()

Gets the type of this attribute, default is the String "CDATA".

Returns:String

the type as a String, default is "CDATA"

getNameback to summary
public QName getName()

Returns the QName for this attribute.

Returns:QName

the QName of the attribute

getValueback to summary
public String getValue()

Gets the normalized value of this attribute.

Returns:String

the normalized value of the attribute

isSpecifiedback to summary
public boolean isSpecified()

A flag indicating whether this attribute was actually specified in the start-tag of its element, or was defaulted from the schema.

Returns:boolean

returns true if this was specified in the start element