01 package javax.xml.stream.events;
02
03 import javax.xml.namespace.QName;
04
05 /**
06 * An interface that contains information about an attribute. Attributes are reported
07 * as a set of events accessible from a StartElement. Other applications may report
08 * Attributes as first-order events, for example as the results of an XPath expression.
09 *
10 * @version 1.0
11 * @author Copyright (c) 2003 by BEA Systems. All Rights Reserved.
12 * @see StartElement
13 * @since 1.6
14 */
15 public interface Attribute extends XMLEvent {
16
17 /**
18 * Returns the QName for this attribute
19 */
20 QName getName();
21
22 /**
23 * Gets the normalized value of this attribute
24 */
25 public String getValue();
26
27 /**
28 * Gets the type of this attribute, default is
29 * the String "CDATA"
30 * @return the type as a String, default is "CDATA"
31 */
32 public String getDTDType();
33
34 /**
35 * A flag indicating whether this attribute was actually
36 * specified in the start-tag of its element, or was defaulted from the schema.
37 * @return returns true if this was specified in the start element
38 */
39 public boolean isSpecified();
40
41 }
|