1 /*
2  * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.  Oracle designates this
8  * particular file as subject to the "Classpath" exception as provided
9  * by Oracle in the LICENSE file that accompanied this code.
10  *
11  * This code is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14  * version 2 for more details (a copy is included in the LICENSE file that
15  * accompanied this code).
16  *
17  * You should have received a copy of the GNU General Public License version
18  * 2 along with this work; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20  *
21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22  * or visit www.oracle.com if you need additional information or have any
23  * questions.
24  */
25 
26 package javax.xml.stream;
27 
28 /**
29  * This interface declares the constants used in this API.
30  * Numbers in the range 0 to 256 are reserved for the specification,
31  * user defined events must use event codes outside that range.
32  *
33  * @since 1.6
34  */
35 
36 public interface XMLStreamConstants {
37   /**
38    * Indicates an event is a start element
39    * @see javax.xml.stream.events.StartElement
40    */
41   public static final int START_ELEMENT=1;
42   /**
43    * Indicates an event is an end element
44    * @see javax.xml.stream.events.EndElement
45    */
46   public static final int END_ELEMENT=2;
47   /**
48    * Indicates an event is a processing instruction
49    * @see javax.xml.stream.events.ProcessingInstruction
50    */
51   public static final int PROCESSING_INSTRUCTION=3;
52 
53   /**
54    * Indicates an event is characters
55    * @see javax.xml.stream.events.Characters
56    */
57   public static final int CHARACTERS=4;
58 
59   /**
60    * Indicates an event is a comment
61    * @see javax.xml.stream.events.Comment
62    */
63   public static final int COMMENT=5;
64 
65   /**
66    * The characters are white space
67    * (see [XML], 2.10 "White Space Handling").
68    * Events are only reported as SPACE if they are ignorable white
69    * space.  Otherwise they are reported as CHARACTERS.
70    * @see javax.xml.stream.events.Characters
71    */
72   public static final int SPACE=6;
73 
74   /**
75    * Indicates an event is a start document
76    * @see javax.xml.stream.events.StartDocument
77    */
78   public static final int START_DOCUMENT=7;
79 
80   /**
81    * Indicates an event is an end document
82    * @see javax.xml.stream.events.EndDocument
83    */
84   public static final int END_DOCUMENT=8;
85 
86   /**
87    * Indicates an event is an entity reference
88    * @see javax.xml.stream.events.EntityReference
89    */
90   public static final int ENTITY_REFERENCE=9;
91 
92   /**
93    * Indicates an event is an attribute
94    * @see javax.xml.stream.events.Attribute
95    */
96   public static final int ATTRIBUTE=10;
97 
98   /**
99    * Indicates an event is a DTD
100    * @see javax.xml.stream.events.DTD
101    */
102   public static final int DTD=11;
103 
104   /**
105    * Indicates an event is a CDATA section
106    * @see javax.xml.stream.events.Characters
107    */
108   public static final int CDATA=12;
109 
110   /**
111    * Indicates the event is a namespace declaration
112    *
113    * @see javax.xml.stream.events.Namespace
114    */
115   public static final int NAMESPACE=13;
116 
117   /**
118    * Indicates a Notation
119    * @see javax.xml.stream.events.NotationDeclaration
120    */
121   public static final int NOTATION_DECLARATION=14;
122 
123   /**
124    * Indicates a Entity Declaration
125    * @see javax.xml.stream.events.NotationDeclaration
126    */
127   public static final int ENTITY_DECLARATION=15;
128 }
129