jaxp/src/javax/xml/stream/XMLStreamReader.java
author joehw
Thu, 12 Apr 2012 08:38:26 -0700
changeset 12457 c348e06f0e82
parent 12005 jaxp/src/share/classes/javax/xml/stream/XMLStreamReader.java@a754d69d5e60
permissions -rw-r--r--
7160496: Rename JDK8 JAXP source directory Summary: moving src/share/classes to src Reviewed-by: ohair
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     1
/*
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     3
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     6
 * published by the Free Software Foundation.  Oracle designates this
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     7
 * particular file as subject to the "Classpath" exception as provided
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     8
 * by Oracle in the LICENSE file that accompanied this code.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     9
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    14
 * accompanied this code).
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    15
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    19
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    22
 * questions.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    23
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    24
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    25
/*
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    26
 * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    27
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    28
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    29
package javax.xml.stream;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    30
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    31
import java.io.Reader;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    32
import javax.xml.namespace.NamespaceContext;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    33
import javax.xml.namespace.QName;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    34
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    35
/**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    36
 *  The XMLStreamReader interface allows forward, read-only access to XML.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    37
 *  It is designed to be the lowest level and most efficient way to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    38
 *  read XML data.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    39
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    40
 * <p> The XMLStreamReader is designed to iterate over XML using
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    41
 * next() and hasNext().  The data can be accessed using methods such as getEventType(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    42
 * getNamespaceURI(), getLocalName() and getText();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    43
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    44
 * <p> The <a href="#next()">next()</a> method causes the reader to read the next parse event.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    45
 * The next() method returns an integer which identifies the type of event just read.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    46
 * <p> The event type can be determined using <a href="#getEventType()">getEventType()</a>.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    47
 * <p> Parsing events are defined as the XML Declaration, a DTD,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    48
 * start tag, character data, white space, end tag, comment,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    49
 * or processing instruction.  An attribute or namespace event may be encountered
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    50
 * at the root level of a document as the result of a query operation.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    51
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    52
 * <p>For XML 1.0 compliance an XML processor must pass the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    53
 * identifiers of declared unparsed entities, notation declarations and their
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    54
 * associated identifiers to the application.  This information is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    55
 * provided through the property API on this interface.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    56
 * The following two properties allow access to this information:
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    57
 * javax.xml.stream.notations and javax.xml.stream.entities.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    58
 * When the current event is a DTD the following call will return a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    59
 * list of Notations
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    60
 *  <code>List l = (List) getProperty("javax.xml.stream.notations");</code>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    61
 * The following call will return a list of entity declarations:
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    62
 * <code>List l = (List) getProperty("javax.xml.stream.entities");</code>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    63
 * These properties can only be accessed during a DTD event and
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    64
 * are defined to return null if the information is not available.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    65
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    66
 * <p>The following table describes which methods are valid in what state.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    67
 * If a method is called in an invalid state the method will throw a
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    68
 * java.lang.IllegalStateException.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    69
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    70
 * <table border="2" rules="all" cellpadding="4">
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    71
 *   <thead>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    72
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    73
 *       <th align="center" colspan="2">
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    74
 *         Valid methods for each state
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    75
 *       </th>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    76
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    77
 *   </thead>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    78
 *   <tbody>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    79
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    80
 *       <th>Event Type</th>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    81
 *       <th>Valid Methods</th>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    82
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    83
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    84
 *       <td> All States  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    85
 *       <td> getProperty(), hasNext(), require(), close(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    86
 *            getNamespaceURI(), isStartElement(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    87
 *            isEndElement(), isCharacters(), isWhiteSpace(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    88
 *            getNamespaceContext(), getEventType(),getLocation(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    89
 *            hasText(), hasName()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    90
 *       </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    91
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    92
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    93
 *       <td> START_ELEMENT  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    94
 *       <td> next(), getName(), getLocalName(), hasName(), getPrefix(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    95
 *            getAttributeXXX(), isAttributeSpecified(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    96
 *            getNamespaceXXX(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    97
 *            getElementText(), nextTag()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    98
 *       </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    99
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   100
 *       <td> ATTRIBUTE  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   101
 *       <td> next(), nextTag()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   102
 *            getAttributeXXX(), isAttributeSpecified(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   103
 *       </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   104
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   105
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   106
 *       <td> NAMESPACE  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   107
 *       <td> next(), nextTag()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   108
 *            getNamespaceXXX()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   109
 *       </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   110
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   111
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   112
 *       <td> END_ELEMENT  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   113
 *       <td> next(), getName(), getLocalName(), hasName(), getPrefix(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   114
 *            getNamespaceXXX(), nextTag()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   115
 *      </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   116
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   117
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   118
 *       <td> CHARACTERS  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   119
 *       <td> next(), getTextXXX(), nextTag() </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   120
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   121
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   122
 *       <td> CDATA  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   123
 *       <td> next(), getTextXXX(), nextTag() </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   124
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   125
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   126
 *       <td> COMMENT  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   127
 *       <td> next(), getTextXXX(), nextTag() </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   128
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   129
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   130
 *       <td> SPACE  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   131
 *       <td> next(), getTextXXX(), nextTag() </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   132
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   133
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   134
 *       <td> START_DOCUMENT  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   135
 *       <td> next(), getEncoding(), getVersion(), isStandalone(), standaloneSet(),
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   136
 *            getCharacterEncodingScheme(), nextTag()</td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   137
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   138
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   139
 *       <td> END_DOCUMENT  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   140
 *       <td> close()</td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   141
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   142
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   143
 *       <td> PROCESSING_INSTRUCTION  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   144
 *       <td> next(), getPITarget(), getPIData(), nextTag() </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   145
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   146
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   147
 *       <td> ENTITY_REFERENCE  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   148
 *       <td> next(), getLocalName(), getText(), nextTag() </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   149
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   150
 *     <tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   151
 *       <td> DTD  </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   152
 *       <td> next(), getText(), nextTag() </td>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   153
 *     </tr>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   154
 *   </tbody>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   155
 *  </table>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   156
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   157
 * @version 1.0
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   158
 * @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   159
 * @see javax.xml.stream.events.XMLEvent
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   160
 * @see XMLInputFactory
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   161
 * @see XMLStreamWriter
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   162
 * @since 1.6
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   163
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   164
public interface XMLStreamReader extends XMLStreamConstants {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   165
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   166
   * Get the value of a feature/property from the underlying implementation
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   167
   * @param name The name of the property, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   168
   * @return The value of the property
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   169
   * @throws IllegalArgumentException if name is null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   170
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   171
  public Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   172
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   173
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   174
   * Get next parsing event - a processor may return all contiguous
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   175
   * character data in a single chunk, or it may split it into several chunks.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   176
   * If the property javax.xml.stream.isCoalescing is set to true
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   177
   * element content must be coalesced and only one CHARACTERS event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   178
   * must be returned for contiguous element content or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   179
   * CDATA Sections.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   180
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   181
   * By default entity references must be
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   182
   * expanded and reported transparently to the application.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   183
   * An exception will be thrown if an entity reference cannot be expanded.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   184
   * If element content is empty (i.e. content is "") then no CHARACTERS event will be reported.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   185
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   186
   * <p>Given the following XML:<br>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   187
   * &lt;foo>&lt;!--description-->content text&lt;![CDATA[&lt;greeting>Hello&lt;/greeting>]]>other content&lt;/foo><br>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   188
   * The behavior of calling next() when being on foo will be:<br>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   189
   * 1- the comment (COMMENT)<br>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   190
   * 2- then the characters section (CHARACTERS)<br>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   191
   * 3- then the CDATA section (another CHARACTERS)<br>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   192
   * 4- then the next characters section (another CHARACTERS)<br>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   193
   * 5- then the END_ELEMENT<br>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   194
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   195
   * <p><b>NOTE:</b> empty element (such as &lt;tag/>) will be reported
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   196
   *  with  two separate events: START_ELEMENT, END_ELEMENT - This preserves
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   197
   *   parsing equivalency of empty element to &lt;tag>&lt;/tag>.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   198
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   199
   * This method will throw an IllegalStateException if it is called after hasNext() returns false.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   200
   * @see javax.xml.stream.events.XMLEvent
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   201
   * @return the integer code corresponding to the current parse event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   202
   * @throws NoSuchElementException if this is called when hasNext() returns false
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   203
   * @throws XMLStreamException  if there is an error processing the underlying XML source
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   204
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   205
  public int next() throws XMLStreamException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   206
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   207
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   208
   * Test if the current event is of the given type and if the namespace and name match the current
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   209
   * namespace and name of the current event.  If the namespaceURI is null it is not checked for equality,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   210
   * if the localName is null it is not checked for equality.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   211
   * @param type the event type
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   212
   * @param namespaceURI the uri of the event, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   213
   * @param localName the localName of the event, may be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   214
   * @throws XMLStreamException if the required values are not matched.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   215
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   216
  public void require(int type, String namespaceURI, String localName) throws XMLStreamException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   217
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   218
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   219
   * Reads the content of a text-only element, an exception is thrown if this is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   220
   * not a text-only element.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   221
   * Regardless of value of javax.xml.stream.isCoalescing this method always returns coalesced content.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   222
   * <br /> Precondition: the current event is START_ELEMENT.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   223
   * <br /> Postcondition: the current event is the corresponding END_ELEMENT.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   224
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   225
   * <br />The method does the following (implementations are free to optimized
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   226
   * but must do equivalent processing):
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   227
   * <pre>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   228
   * if(getEventType() != XMLStreamConstants.START_ELEMENT) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   229
   * throw new XMLStreamException(
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   230
   * "parser must be on START_ELEMENT to read next text", getLocation());
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   231
   * }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   232
   * int eventType = next();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   233
   * StringBuffer content = new StringBuffer();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   234
   * while(eventType != XMLStreamConstants.END_ELEMENT ) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   235
   * if(eventType == XMLStreamConstants.CHARACTERS
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   236
   * || eventType == XMLStreamConstants.CDATA
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   237
   * || eventType == XMLStreamConstants.SPACE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   238
   * || eventType == XMLStreamConstants.ENTITY_REFERENCE) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   239
   * buf.append(getText());
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   240
   * } else if(eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   241
   * || eventType == XMLStreamConstants.COMMENT) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   242
   * // skipping
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   243
   * } else if(eventType == XMLStreamConstants.END_DOCUMENT) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   244
   * throw new XMLStreamException(
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   245
   * "unexpected end of document when reading element text content", this);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   246
   * } else if(eventType == XMLStreamConstants.START_ELEMENT) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   247
   * throw new XMLStreamException(
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   248
   * "element text content may not contain START_ELEMENT", getLocation());
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   249
   * } else {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   250
   * throw new XMLStreamException(
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   251
   * "Unexpected event type "+eventType, getLocation());
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   252
   * }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   253
   * eventType = next();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   254
   * }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   255
   * return buf.toString();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   256
   * </pre>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   257
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   258
   * @throws XMLStreamException if the current event is not a START_ELEMENT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   259
   * or if a non text element is encountered
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   260
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   261
  public String getElementText() throws XMLStreamException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   262
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   263
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   264
   * Skips any white space (isWhiteSpace() returns true), COMMENT,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   265
   * or PROCESSING_INSTRUCTION,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   266
   * until a START_ELEMENT or END_ELEMENT is reached.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   267
   * If other than white space characters, COMMENT, PROCESSING_INSTRUCTION, START_ELEMENT, END_ELEMENT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   268
   * are encountered, an exception is thrown. This method should
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   269
   * be used when processing element-only content seperated by white space.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   270
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   271
   * <br /> Precondition: none
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   272
   * <br /> Postcondition: the current event is START_ELEMENT or END_ELEMENT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   273
   * and cursor may have moved over any whitespace event.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   274
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   275
   * <br />Essentially it does the following (implementations are free to optimized
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   276
   * but must do equivalent processing):
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   277
   * <pre>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   278
   * int eventType = next();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   279
   * while((eventType == XMLStreamConstants.CHARACTERS &amp;&amp; isWhiteSpace()) // skip whitespace
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   280
   * || (eventType == XMLStreamConstants.CDATA &amp;&amp; isWhiteSpace())
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   281
   * // skip whitespace
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   282
   * || eventType == XMLStreamConstants.SPACE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   283
   * || eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   284
   * || eventType == XMLStreamConstants.COMMENT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   285
   * ) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   286
   * eventType = next();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   287
   * }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   288
   * if (eventType != XMLStreamConstants.START_ELEMENT &amp;&amp; eventType != XMLStreamConstants.END_ELEMENT) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   289
   * throw new String XMLStreamException("expected start or end tag", getLocation());
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   290
   * }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   291
   * return eventType;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   292
   * </pre>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   293
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   294
   * @return the event type of the element read (START_ELEMENT or END_ELEMENT)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   295
   * @throws XMLStreamException if the current event is not white space, PROCESSING_INSTRUCTION,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   296
   * START_ELEMENT or END_ELEMENT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   297
   * @throws NoSuchElementException if this is called when hasNext() returns false
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   298
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   299
  public int nextTag() throws XMLStreamException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   300
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   301
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   302
   * Returns true if there are more parsing events and false
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   303
   * if there are no more events.  This method will return
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   304
   * false if the current state of the XMLStreamReader is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   305
   * END_DOCUMENT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   306
   * @return true if there are more events, false otherwise
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   307
   * @throws XMLStreamException if there is a fatal error detecting the next state
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   308
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   309
  public boolean hasNext() throws XMLStreamException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   310
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   311
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   312
   * Frees any resources associated with this Reader.  This method does not close the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   313
   * underlying input source.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   314
   * @throws XMLStreamException if there are errors freeing associated resources
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   315
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   316
  public void close() throws XMLStreamException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   317
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   318
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   319
   * Return the uri for the given prefix.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   320
   * The uri returned depends on the current state of the processor.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   321
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   322
   * <p><strong>NOTE:</strong>The 'xml' prefix is bound as defined in
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   323
   * <a href="http://www.w3.org/TR/REC-xml-names/#ns-using">Namespaces in XML</a>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   324
   * specification to "http://www.w3.org/XML/1998/namespace".
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   325
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   326
   * <p><strong>NOTE:</strong> The 'xmlns' prefix must be resolved to following namespace
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   327
   * <a href="http://www.w3.org/2000/xmlns/">http://www.w3.org/2000/xmlns/</a>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   328
   * @param prefix The prefix to lookup, may not be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   329
   * @return the uri bound to the given prefix or null if it is not bound
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   330
   * @throws IllegalArgumentException if the prefix is null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   331
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   332
  public String getNamespaceURI(String prefix);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   333
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   334
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   335
   * Returns true if the cursor points to a start tag (otherwise false)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   336
   * @return true if the cursor points to a start tag, false otherwise
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   337
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   338
  public boolean isStartElement();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   339
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   340
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   341
   * Returns true if the cursor points to an end tag (otherwise false)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   342
   * @return true if the cursor points to an end tag, false otherwise
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   343
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   344
  public boolean isEndElement();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   345
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   346
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   347
   * Returns true if the cursor points to a character data event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   348
   * @return true if the cursor points to character data, false otherwise
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   349
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   350
  public boolean isCharacters();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   351
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   352
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   353
   * Returns true if the cursor points to a character data event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   354
   * that consists of all whitespace
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   355
   * @return true if the cursor points to all whitespace, false otherwise
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   356
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   357
  public boolean isWhiteSpace();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   358
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   359
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   360
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   361
   * Returns the normalized attribute value of the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   362
   * attribute with the namespace and localName
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   363
   * If the namespaceURI is null the namespace
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   364
   * is not checked for equality
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   365
   * @param namespaceURI the namespace of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   366
   * @param localName the local name of the attribute, cannot be null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   367
   * @return returns the value of the attribute , returns null if not found
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   368
   * @throws IllegalStateException if this is not a START_ELEMENT or ATTRIBUTE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   369
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   370
  public String getAttributeValue(String namespaceURI,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   371
                                  String localName);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   372
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   373
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   374
   * Returns the count of attributes on this START_ELEMENT,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   375
   * this method is only valid on a START_ELEMENT or ATTRIBUTE.  This
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   376
   * count excludes namespace definitions.  Attribute indices are
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   377
   * zero-based.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   378
   * @return returns the number of attributes
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   379
   * @throws IllegalStateException if this is not a START_ELEMENT or ATTRIBUTE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   380
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   381
  public int getAttributeCount();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   382
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   383
  /** Returns the qname of the attribute at the provided index
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   384
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   385
   * @param index the position of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   386
   * @return the QName of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   387
   * @throws IllegalStateException if this is not a START_ELEMENT or ATTRIBUTE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   388
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   389
  public QName getAttributeName(int index);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   390
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   391
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   392
   * Returns the namespace of the attribute at the provided
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   393
   * index
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   394
   * @param index the position of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   395
   * @return the namespace URI (can be null)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   396
   * @throws IllegalStateException if this is not a START_ELEMENT or ATTRIBUTE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   397
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   398
  public String getAttributeNamespace(int index);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   399
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   400
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   401
   * Returns the localName of the attribute at the provided
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   402
   * index
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   403
   * @param index the position of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   404
   * @return the localName of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   405
   * @throws IllegalStateException if this is not a START_ELEMENT or ATTRIBUTE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   406
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   407
  public String getAttributeLocalName(int index);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   408
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   409
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   410
   * Returns the prefix of this attribute at the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   411
   * provided index
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   412
   * @param index the position of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   413
   * @return the prefix of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   414
   * @throws IllegalStateException if this is not a START_ELEMENT or ATTRIBUTE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   415
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   416
  public String getAttributePrefix(int index);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   417
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   418
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   419
   * Returns the XML type of the attribute at the provided
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   420
   * index
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   421
   * @param index the position of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   422
   * @return the XML type of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   423
   * @throws IllegalStateException if this is not a START_ELEMENT or ATTRIBUTE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   424
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   425
  public String getAttributeType(int index);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   426
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   427
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   428
   * Returns the value of the attribute at the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   429
   * index
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   430
   * @param index the position of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   431
   * @return the attribute value
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   432
   * @throws IllegalStateException if this is not a START_ELEMENT or ATTRIBUTE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   433
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   434
  public String getAttributeValue(int index);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   435
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   436
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   437
   * Returns a boolean which indicates if this
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   438
   * attribute was created by default
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   439
   * @param index the position of the attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   440
   * @return true if this is a default attribute
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   441
   * @throws IllegalStateException if this is not a START_ELEMENT or ATTRIBUTE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   442
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   443
  public boolean isAttributeSpecified(int index);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   444
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   445
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   446
   * Returns the count of namespaces declared on this START_ELEMENT or END_ELEMENT,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   447
   * this method is only valid on a START_ELEMENT, END_ELEMENT or NAMESPACE. On
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   448
   * an END_ELEMENT the count is of the namespaces that are about to go
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   449
   * out of scope.  This is the equivalent of the information reported
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   450
   * by SAX callback for an end element event.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   451
   * @return returns the number of namespace declarations on this specific element
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   452
   * @throws IllegalStateException if this is not a START_ELEMENT, END_ELEMENT or NAMESPACE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   453
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   454
  public int getNamespaceCount();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   455
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   456
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   457
   * Returns the prefix for the namespace declared at the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   458
   * index.  Returns null if this is the default namespace
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   459
   * declaration
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   460
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   461
   * @param index the position of the namespace declaration
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   462
   * @return returns the namespace prefix
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   463
   * @throws IllegalStateException if this is not a START_ELEMENT, END_ELEMENT or NAMESPACE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   464
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   465
  public String getNamespacePrefix(int index);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   466
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   467
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   468
   * Returns the uri for the namespace declared at the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   469
   * index.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   470
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   471
   * @param index the position of the namespace declaration
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   472
   * @return returns the namespace uri
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   473
   * @throws IllegalStateException if this is not a START_ELEMENT, END_ELEMENT or NAMESPACE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   474
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   475
  public String getNamespaceURI(int index);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   476
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   477
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   478
   * Returns a read only namespace context for the current
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   479
   * position.  The context is transient and only valid until
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   480
   * a call to next() changes the state of the reader.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   481
   * @return return a namespace context
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   482
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   483
  public NamespaceContext getNamespaceContext();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   484
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   485
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   486
   * Returns a reader that points to the current start element
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   487
   * and all of its contents.  Throws an XMLStreamException if the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   488
   * cursor does not point to a START_ELEMENT.<p>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   489
   * The sub stream is read from it MUST be read before the parent stream is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   490
   * moved on, if not any call on the sub stream will cause an XMLStreamException to be
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   491
   * thrown.   The parent stream will always return the same result from next()
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   492
   * whatever is done to the sub stream.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   493
   * @return an XMLStreamReader which points to the next element
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   494
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   495
  //  public XMLStreamReader subReader() throws XMLStreamException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   496
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   497
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   498
   * Allows the implementation to reset and reuse any underlying tables
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   499
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   500
  //  public void recycle() throws XMLStreamException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   501
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   502
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   503
   * Returns an integer code that indicates the type
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   504
   * of the event the cursor is pointing to.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   505
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   506
  public int getEventType();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   507
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   508
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   509
   * Returns the current value of the parse event as a string,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   510
   * this returns the string value of a CHARACTERS event,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   511
   * returns the value of a COMMENT, the replacement value
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   512
   * for an ENTITY_REFERENCE, the string value of a CDATA section,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   513
   * the string value for a SPACE event,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   514
   * or the String value of the internal subset of the DTD.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   515
   * If an ENTITY_REFERENCE has been resolved, any character data
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   516
   * will be reported as CHARACTERS events.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   517
   * @return the current text or null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   518
   * @throws java.lang.IllegalStateException if this state is not
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   519
   * a valid text state.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   520
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   521
  public String getText();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   522
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   523
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   524
   * Returns an array which contains the characters from this event.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   525
   * This array should be treated as read-only and transient. I.e. the array will
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   526
   * contain the text characters until the XMLStreamReader moves on to the next event.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   527
   * Attempts to hold onto the character array beyond that time or modify the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   528
   * contents of the array are breaches of the contract for this interface.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   529
   * @return the current text or an empty array
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   530
   * @throws java.lang.IllegalStateException if this state is not
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   531
   * a valid text state.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   532
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   533
  public char[] getTextCharacters();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   534
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   535
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   536
   * Gets the the text associated with a CHARACTERS, SPACE or CDATA event.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   537
   * Text starting a "sourceStart" is copied into "target" starting at "targetStart".
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   538
   * Up to "length" characters are copied.  The number of characters actually copied is returned.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   539
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   540
   * The "sourceStart" argument must be greater or equal to 0 and less than or equal to
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   541
   * the number of characters associated with the event.  Usually, one requests text starting at a "sourceStart" of 0.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   542
   * If the number of characters actually copied is less than the "length", then there is no more text.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   543
   * Otherwise, subsequent calls need to be made until all text has been retrieved. For example:
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   544
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   545
   *<code>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   546
   * int length = 1024;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   547
   * char[] myBuffer = new char[ length ];
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   548
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   549
   * for ( int sourceStart = 0 ; ; sourceStart += length )
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   550
   * {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   551
   *    int nCopied = stream.getTextCharacters( sourceStart, myBuffer, 0, length );
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   552
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   553
   *   if (nCopied < length)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   554
   *       break;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   555
   * }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   556
   * </code>
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   557
   * XMLStreamException may be thrown if there are any XML errors in the underlying source.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   558
   * The "targetStart" argument must be greater than or equal to 0 and less than the length of "target",
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   559
   * Length must be greater than 0 and "targetStart + length" must be less than or equal to length of "target".
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   560
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   561
   * @param sourceStart the index of the first character in the source array to copy
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   562
   * @param target the destination array
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   563
   * @param targetStart the start offset in the target array
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   564
   * @param length the number of characters to copy
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   565
   * @return the number of characters actually copied
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   566
   * @throws XMLStreamException if the underlying XML source is not well-formed
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   567
   * @throws IndexOutOfBoundsException if targetStart < 0 or > than the length of target
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   568
   * @throws IndexOutOfBoundsException if length < 0 or targetStart + length > length of target
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   569
   * @throws UnsupportedOperationException if this method is not supported
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   570
   * @throws NullPointerException is if target is null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   571
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   572
   public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   573
     throws XMLStreamException;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   574
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   575
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   576
   * Gets the text associated with a CHARACTERS, SPACE or CDATA event.  Allows the underlying
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   577
   * implementation to return the text as a stream of characters.  The reference to the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   578
   * Reader returned by this method is only valid until next() is called.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   579
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   580
   * All characters must have been checked for well-formedness.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   581
   *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   582
   * <p> This method is optional and will throw UnsupportedOperationException if it is not supported.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   583
   * @throws UnsupportedOperationException if this method is not supported
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   584
   * @throws IllegalStateException if this is not a valid text state
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   585
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   586
  //public Reader getTextStream();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   587
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   588
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   589
   * Returns the offset into the text character array where the first
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   590
   * character (of this text event) is stored.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   591
   * @throws java.lang.IllegalStateException if this state is not
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   592
   * a valid text state.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   593
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   594
  public int getTextStart();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   595
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   596
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   597
   * Returns the length of the sequence of characters for this
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   598
   * Text event within the text character array.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   599
   * @throws java.lang.IllegalStateException if this state is not
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   600
   * a valid text state.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   601
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   602
  public int getTextLength();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   603
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   604
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   605
   * Return input encoding if known or null if unknown.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   606
   * @return the encoding of this instance or null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   607
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   608
  public String getEncoding();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   609
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   610
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   611
   * Return true if the current event has text, false otherwise
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   612
   * The following events have text:
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   613
   * CHARACTERS,DTD ,ENTITY_REFERENCE, COMMENT, SPACE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   614
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   615
  public boolean hasText();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   616
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   617
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   618
   * Return the current location of the processor.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   619
   * If the Location is unknown the processor should return
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   620
   * an implementation of Location that returns -1 for the
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   621
   * location and null for the publicId and systemId.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   622
   * The location information is only valid until next() is
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   623
   * called.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   624
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   625
  public Location getLocation();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   626
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   627
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   628
   * Returns a QName for the current START_ELEMENT or END_ELEMENT event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   629
   * @return the QName for the current START_ELEMENT or END_ELEMENT event
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   630
   * @throws IllegalStateException if this is not a START_ELEMENT or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   631
   * END_ELEMENT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   632
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   633
  public QName getName();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   634
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   635
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   636
   * Returns the (local) name of the current event.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   637
   * For START_ELEMENT or END_ELEMENT returns the (local) name of the current element.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   638
   * For ENTITY_REFERENCE it returns entity name.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   639
   * The current event must be START_ELEMENT or END_ELEMENT,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   640
   * or ENTITY_REFERENCE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   641
   * @return the localName
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   642
   * @throws IllegalStateException if this not a START_ELEMENT,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   643
   * END_ELEMENT or ENTITY_REFERENCE
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   644
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   645
  public String getLocalName();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   646
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   647
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   648
   * returns true if the current event has a name (is a START_ELEMENT or END_ELEMENT)
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   649
   * returns false otherwise
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   650
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   651
  public boolean hasName();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   652
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   653
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   654
   * If the current event is a START_ELEMENT or END_ELEMENT  this method
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   655
   * returns the URI of the prefix or the default namespace.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   656
   * Returns null if the event does not have a prefix.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   657
   * @return the URI bound to this elements prefix, the default namespace, or null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   658
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   659
  public String getNamespaceURI();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   660
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   661
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   662
   * Returns the prefix of the current event or null if the event does not have a prefix
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   663
   * @return the prefix or null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   664
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   665
  public String getPrefix();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   666
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   667
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   668
   * Get the xml version declared on the xml declaration
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   669
   * Returns null if none was declared
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   670
   * @return the XML version or null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   671
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   672
  public String getVersion();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   673
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   674
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   675
   * Get the standalone declaration from the xml declaration
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   676
   * @return true if this is standalone, or false otherwise
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   677
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   678
  public boolean isStandalone();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   679
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   680
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   681
   * Checks if standalone was set in the document
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   682
   * @return true if standalone was set in the document, or false otherwise
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   683
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   684
  public boolean standaloneSet();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   685
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   686
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   687
   * Returns the character encoding declared on the xml declaration
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   688
   * Returns null if none was declared
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   689
   * @return the encoding declared in the document or null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   690
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   691
  public String getCharacterEncodingScheme();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   692
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   693
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   694
   * Get the target of a processing instruction
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   695
   * @return the target or null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   696
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   697
  public String getPITarget();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   698
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   699
  /**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   700
   * Get the data section of a processing instruction
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   701
   * @return the data or null
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   702
   */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   703
  public String getPIData();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   704
}