001: package javax.xml.stream;
002:
003: /**
004: * This interface declares the constants used in this API.
005: * Numbers in the range 0 to 256 are reserved for the specification,
006: * user defined events must use event codes outside that range.
007: */
008:
009: public interface XMLStreamConstants {
010: /**
011: * Indicates an event is a start element
012: * @see javax.xml.stream.events.StartElement
013: */
014: public static final int START_ELEMENT = 1;
015: /**
016: * Indicates an event is an end element
017: * @see javax.xml.stream.events.EndElement
018: */
019: public static final int END_ELEMENT = 2;
020: /**
021: * Indicates an event is a processing instruction
022: * @see javax.xml.stream.events.ProcessingInstruction
023: */
024: public static final int PROCESSING_INSTRUCTION = 3;
025:
026: /**
027: * Indicates an event is characters
028: * @see javax.xml.stream.events.Characters
029: */
030: public static final int CHARACTERS = 4;
031:
032: /**
033: * Indicates an event is a comment
034: * @see javax.xml.stream.events.Comment
035: */
036: public static final int COMMENT = 5;
037:
038: /**
039: * The characters are white space
040: * (see [XML], 2.10 "White Space Handling").
041: * Events are only reported as SPACE if they are ignorable white
042: * space. Otherwise they are reported as CHARACTERS.
043: * @see javax.xml.stream.events.Characters
044: */
045: public static final int SPACE = 6;
046:
047: /**
048: * Indicates an event is a start document
049: * @see javax.xml.stream.events.StartDocument
050: */
051: public static final int START_DOCUMENT = 7;
052:
053: /**
054: * Indicates an event is an end document
055: * @see javax.xml.stream.events.EndDocument
056: */
057: public static final int END_DOCUMENT = 8;
058:
059: /**
060: * Indicates an event is an entity reference
061: * @see javax.xml.stream.events.EntityReference
062: */
063: public static final int ENTITY_REFERENCE = 9;
064:
065: /**
066: * Indicates an event is an attribute
067: * @see javax.xml.stream.events.Attribute
068: */
069: public static final int ATTRIBUTE = 10;
070:
071: /**
072: * Indicates an event is a DTD
073: * @see javax.xml.stream.events.DTD
074: */
075: public static final int DTD = 11;
076:
077: /**
078: * Indicates an event is a CDATA section
079: * @see javax.xml.stream.events.Characters
080: */
081: public static final int CDATA = 12;
082:
083: /**
084: * Indicates the event is a namespace declaration
085: *
086: * @see javax.xml.stream.events.Namespace
087: */
088: public static final int NAMESPACE = 13;
089:
090: /**
091: * Indicates a Notation
092: * @see javax.xml.stream.events.NotationDeclaration
093: */
094: public static final int NOTATION_DECLARATION = 14;
095:
096: /**
097: * Indicates a Entity Declaration
098: * @see javax.xml.stream.events.NotationDeclaration
099: */
100: public static final int ENTITY_DECLARATION = 15;
101: }
|