com.sun.xml.stream
Class XMLReaderImpl

java.lang.Object
  extended by com.sun.xml.stream.XMLReaderImpl
All Implemented Interfaces:
javax.xml.stream.XMLStreamConstants, javax.xml.stream.XMLStreamReader

public class XMLReaderImpl
extends java.lang.Object
implements javax.xml.stream.XMLStreamReader

This class implements javax.xml.stream.XMLStreamReader. It makes use of XML*Scanner classes to derive most of its functionality. If desired, Application can reuse this instance by calling reset() and setInputSource().

Author:
Neeraj Bajaj Sun Microsystems,Inc., K.Venugopal Sun Microsystems,Inc.

Field Summary
protected static java.lang.String ENTITY_MANAGER
          Property identifier: entity manager.
protected static java.lang.String ERROR_REPORTER
          Property identifier: Error Reporter.
protected  XMLEntityManager fEntityManager
           
protected  XMLEntityReaderImpl fEntityScanner
          Entity scanner, this alwasy works on last entity that was opened.
protected  StaxErrorReporter fErrorReporter
           
protected  org.apache.xerces.xni.parser.XMLInputSource fInputSource
          Input Source
protected  org.apache.xerces.util.NamespaceContextWrapper fNamespaceContextWrapper
           
protected  PropertyManager fPropertyManager
          Store properties
protected  XMLNSDocumentScannerImpl fScanner
          Document scanner.
protected static java.lang.String READER_IN_DEFINED_STATE
           
protected static java.lang.String SYMBOL_TABLE
          Property identifier: Symbol table.
 
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
 
Constructor Summary
XMLReaderImpl(java.io.InputStream inputStream, PropertyManager props)
           
XMLReaderImpl(java.io.InputStream inputStream, java.lang.String encoding, PropertyManager props)
           
XMLReaderImpl(java.io.Reader reader, PropertyManager props)
           
XMLReaderImpl(java.lang.String systemid, PropertyManager props)
           
XMLReaderImpl(org.apache.xerces.xni.parser.XMLInputSource inputSource, PropertyManager props)
           
 
Method Summary
 boolean canReuse()
          This function tells if this instances is available for reuse.
 void close()
          Frees any resources associated with this Reader.
 javax.xml.namespace.QName convertXNIQNametoJavaxQName(org.apache.xerces.xni.QName qname)
           
 int getAttributeCount()
          Returns the count of attributes on this START_ELEMENT, this method is only valid on a START_ELEMENT or ATTRIBUTE.
 java.lang.String getAttributeLocalName(int index)
           
 javax.xml.namespace.QName getAttributeName(int index)
          Returns the localName of the attribute at the provided index
 java.lang.String getAttributeNamespace(int index)
          Returns the namespace of the attribute at the provided index
 java.lang.String getAttributePrefix(int index)
          Returns the prefix of this attribute at the provided index
 javax.xml.namespace.QName getAttributeQName(int index)
          Returns the qname of the attribute at the provided index
 java.lang.String getAttributeType(int index)
          Returns the XML type of the attribute at the provided index
 java.lang.String getAttributeValue(int index)
          Returns the value of the attribute at the index
 java.lang.String getAttributeValue(java.lang.String namespaceURI, java.lang.String localName)
           
 java.lang.String getCharacterEncodingScheme()
          Returns the character encoding declared on the xml declaration Returns null if none was declared
 int getColumnNumber()
           
 java.lang.String getElementText()
          Reads the content of a text-only element.
 java.lang.String getEncoding()
          Return input encoding if known or null if unknown.
protected  java.util.List getEntityDecls()
           
 int getEventType()
          Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event, returns the value of a COMMENT, the replacement value for an ENTITY_REFERENCE, the string value of a CDATA section, the string value for a SPACE event, or the String value of the internal subset of the DTD.
 int getLineNumber()
           
 java.lang.String getLocalName()
          For START_ELEMENT or END_ELEMENT returns the (local) name of the current element.
 javax.xml.stream.Location getLocation()
          Return the current location of the processor.
 javax.xml.namespace.QName getName()
          Returns a QName for the current START_ELEMENT or END_ELEMENT event
 javax.xml.namespace.NamespaceContext getNamespaceContext()
          Returns a read only namespace context for the current position.
 int getNamespaceCount()
          Returns the count of namespaces declared on this START_ELEMENT or END_ELEMENT, this method is only valid on a START_ELEMENT, END_ELEMENT or NAMESPACE.
 java.lang.String getNamespacePrefix(int index)
          Returns the prefix for the namespace declared at the index.
 java.lang.String getNamespaceURI()
           
 java.lang.String getNamespaceURI(int index)
          Returns the uri for the namespace declared at the index.
 java.lang.String getNamespaceURI(java.lang.String prefix)
          Return the uri for the given prefix.
protected  java.util.List getNotationDecls()
           
 java.lang.String getPIData()
          Get the data section of a processing instruction
 java.lang.String getPITarget()
          Get the target of a processing instruction
 java.lang.String getPrefix()
           
 java.lang.Object getProperty(java.lang.String name)
          Get the value of a feature/property from the underlying implementation
protected  PropertyManager getPropertyManager()
           
 java.lang.String getText()
          Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event, returns the value of a COMMENT, the replacement value for an ENTITY_REFERENCE, or the String value of the DTD
 char[] getTextCharacters()
           
 int getTextCharacters(int sourceStart, char[] target, int targetStart, int length)
          Gets the the text associated with a CHARACTERS, SPACE or CDATA event.
 int getTextLength()
           
 int getTextStart()
           
 java.lang.String getValue()
           
 java.lang.String getVersion()
          Get the XML language version of the current document being parsed
 boolean hasAttributes()
           
 boolean hasName()
          this Funtion returns true if the current event has name
 boolean hasNext()
           
 boolean hasText()
          Return true if the current event has text, false otherwise The following events have text: CHARACTERS,DTD ,ENTITY_REFERENCE, COMMENT
 boolean hasValue()
           
 boolean isAttributeSpecified(int index)
          Returns a boolean which indicates if this attribute was created by default
 boolean isCharacters()
          Returns true if the cursor points to a character data event
 boolean isEndElement()
           
 boolean isStandalone()
           
 boolean isStartElement()
           
 boolean isWhiteSpace()
          Returns true if the cursor points to a character data event that consists of all whitespace Application calling this method needs to cache the value and avoid calling this method again for the same event.
 int next()
           
 int nextTag()
          Skips any insignificant events (COMMENT and PROCESSING_INSTRUCTION) until a START_ELEMENT or END_ELEMENT is reached.
 void require(int type, java.lang.String namespaceURI, java.lang.String localName)
          Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event.
 void reset()
          Resets this instance so that this instance is ready for reuse.
 void setInputSource(org.xml.sax.InputSource inputSource)
          Set the InputSource on this instance.
 void setInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource)
           
protected  void setPropertyManager(PropertyManager propertyManager)
           
 boolean standaloneSet()
          Checks if standalone was set in the document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTITY_MANAGER

protected static final java.lang.String ENTITY_MANAGER
Property identifier: entity manager.

See Also:
Constant Field Values

ERROR_REPORTER

protected static final java.lang.String ERROR_REPORTER
Property identifier: Error Reporter.

See Also:
Constant Field Values

SYMBOL_TABLE

protected static final java.lang.String SYMBOL_TABLE
Property identifier: Symbol table.

See Also:
Constant Field Values

READER_IN_DEFINED_STATE

protected static final java.lang.String READER_IN_DEFINED_STATE
See Also:
Constant Field Values

fScanner

protected XMLNSDocumentScannerImpl fScanner
Document scanner.


fNamespaceContextWrapper

protected org.apache.xerces.util.NamespaceContextWrapper fNamespaceContextWrapper

fEntityManager

protected XMLEntityManager fEntityManager

fErrorReporter

protected StaxErrorReporter fErrorReporter

fEntityScanner

protected XMLEntityReaderImpl fEntityScanner
Entity scanner, this alwasy works on last entity that was opened.


fInputSource

protected org.apache.xerces.xni.parser.XMLInputSource fInputSource
Input Source


fPropertyManager

protected PropertyManager fPropertyManager
Store properties

Constructor Detail

XMLReaderImpl

public XMLReaderImpl(java.io.InputStream inputStream,
                     PropertyManager props)
              throws javax.xml.stream.XMLStreamException
Parameters:
inputStream -
props -
Throws:
javax.xml.stream.XMLStreamException

XMLReaderImpl

public XMLReaderImpl(java.lang.String systemid,
                     PropertyManager props)
              throws javax.xml.stream.XMLStreamException
Parameters:
systemid -
props -
Throws:
javax.xml.stream.XMLStreamException

XMLReaderImpl

public XMLReaderImpl(java.io.InputStream inputStream,
                     java.lang.String encoding,
                     PropertyManager props)
              throws javax.xml.stream.XMLStreamException
Parameters:
inputStream -
encoding -
props -
Throws:
javax.xml.stream.XMLStreamException

XMLReaderImpl

public XMLReaderImpl(java.io.Reader reader,
                     PropertyManager props)
              throws javax.xml.stream.XMLStreamException
Parameters:
reader -
props -
Throws:
javax.xml.stream.XMLStreamException

XMLReaderImpl

public XMLReaderImpl(org.apache.xerces.xni.parser.XMLInputSource inputSource,
                     PropertyManager props)
              throws javax.xml.stream.XMLStreamException
Parameters:
inputSource -
props -
Throws:
javax.xml.stream.XMLStreamException
Method Detail

setInputSource

public void setInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource)
                    throws javax.xml.stream.XMLStreamException
Parameters:
inputSource -
Throws:
javax.xml.stream.XMLStreamException

setInputSource

public void setInputSource(org.xml.sax.InputSource inputSource)
                    throws javax.xml.stream.XMLStreamException
Set the InputSource on this instance.

Parameters:
InputSource - InputSource encapsulating information about XML Source.
Throws:
javax.xml.stream.XMLStreamException - Throws XMLStreamException if there is a problem setting InputSource

canReuse

public boolean canReuse()
This function tells if this instances is available for reuse. One must call reset() and setInputSource() to be able to reuse this instance.


reset

public void reset()
Resets this instance so that this instance is ready for reuse.


close

public void close()
           throws javax.xml.stream.XMLStreamException
Frees any resources associated with this Reader. This method does not close the underlying input source.

Specified by:
close in interface javax.xml.stream.XMLStreamReader
Throws:
javax.xml.stream.XMLStreamException - if there are errors freeing associated resources

getCharacterEncodingScheme

public java.lang.String getCharacterEncodingScheme()
Returns the character encoding declared on the xml declaration Returns null if none was declared

Specified by:
getCharacterEncodingScheme in interface javax.xml.stream.XMLStreamReader
Returns:
the encoding declared in the document or null

getColumnNumber

public int getColumnNumber()
Returns:

getEncoding

public java.lang.String getEncoding()
Return input encoding if known or null if unknown.

Specified by:
getEncoding in interface javax.xml.stream.XMLStreamReader
Returns:
the encoding of this instance or null

getEventType

public int getEventType()
Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event, returns the value of a COMMENT, the replacement value for an ENTITY_REFERENCE, the string value of a CDATA section, the string value for a SPACE event, or the String value of the internal subset of the DTD. If an ENTITY_REFERENCE has been resolved, any character data will be reported as CHARACTERS events.

Specified by:
getEventType in interface javax.xml.stream.XMLStreamReader
Returns:
the current text or null

getLineNumber

public int getLineNumber()
Returns:

getLocalName

public java.lang.String getLocalName()
For START_ELEMENT or END_ELEMENT returns the (local) name of the current element. For ENTITY_REF it returns entity name. For PROCESSING_INSTRUCTION it returns the target. The current event must be START_ELEMENT or END_ELEMENT, PROCESSING_INSTRUCTION, or ENTITY_REF, otherwise null is returned.

Specified by:
getLocalName in interface javax.xml.stream.XMLStreamReader
Returns:

getNamespaceURI

public java.lang.String getNamespaceURI()
Specified by:
getNamespaceURI in interface javax.xml.stream.XMLStreamReader
Returns:

getPIData

public java.lang.String getPIData()
Get the data section of a processing instruction

Specified by:
getPIData in interface javax.xml.stream.XMLStreamReader
Returns:
the data or null

getPITarget

public java.lang.String getPITarget()
Get the target of a processing instruction

Specified by:
getPITarget in interface javax.xml.stream.XMLStreamReader
Returns:
the target or null

getPrefix

public java.lang.String getPrefix()
Specified by:
getPrefix in interface javax.xml.stream.XMLStreamReader
Returns:

getTextCharacters

public char[] getTextCharacters()
Specified by:
getTextCharacters in interface javax.xml.stream.XMLStreamReader
Returns:

getTextLength

public int getTextLength()
Specified by:
getTextLength in interface javax.xml.stream.XMLStreamReader
Returns:

getTextStart

public int getTextStart()
Specified by:
getTextStart in interface javax.xml.stream.XMLStreamReader
Returns:

getValue

public java.lang.String getValue()
Returns:

getVersion

public java.lang.String getVersion()
Get the XML language version of the current document being parsed

Specified by:
getVersion in interface javax.xml.stream.XMLStreamReader

hasAttributes

public boolean hasAttributes()
Returns:

hasName

public boolean hasName()
this Funtion returns true if the current event has name

Specified by:
hasName in interface javax.xml.stream.XMLStreamReader

hasNext

public boolean hasNext()
                throws javax.xml.stream.XMLStreamException
Specified by:
hasNext in interface javax.xml.stream.XMLStreamReader
Returns:
Throws:
javax.xml.stream.XMLStreamException

hasValue

public boolean hasValue()
Returns:

isEndElement

public boolean isEndElement()
Specified by:
isEndElement in interface javax.xml.stream.XMLStreamReader
Returns:

isStandalone

public boolean isStandalone()
Specified by:
isStandalone in interface javax.xml.stream.XMLStreamReader
Returns:

isStartElement

public boolean isStartElement()
Specified by:
isStartElement in interface javax.xml.stream.XMLStreamReader
Returns:

isWhiteSpace

public boolean isWhiteSpace()
Returns true if the cursor points to a character data event that consists of all whitespace Application calling this method needs to cache the value and avoid calling this method again for the same event.

Specified by:
isWhiteSpace in interface javax.xml.stream.XMLStreamReader
Returns:

next

public int next()
         throws javax.xml.stream.XMLStreamException
Specified by:
next in interface javax.xml.stream.XMLStreamReader
Returns:
Throws:
javax.xml.stream.XMLStreamException

getAttributeCount

public int getAttributeCount()
Returns the count of attributes on this START_ELEMENT, this method is only valid on a START_ELEMENT or ATTRIBUTE. This count excludes namespace definitions. Attribute indices are zero-based.

Specified by:
getAttributeCount in interface javax.xml.stream.XMLStreamReader
Returns:
returns the number of attributes
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

getAttributeName

public javax.xml.namespace.QName getAttributeName(int index)
Returns the localName of the attribute at the provided index

Specified by:
getAttributeName in interface javax.xml.stream.XMLStreamReader
Parameters:
index - the position of the attribute
Returns:
the localName of the attribute
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

getAttributeLocalName

public java.lang.String getAttributeLocalName(int index)
Specified by:
getAttributeLocalName in interface javax.xml.stream.XMLStreamReader
Parameters:
index -
Returns:

getAttributeNamespace

public java.lang.String getAttributeNamespace(int index)
Returns the namespace of the attribute at the provided index

Specified by:
getAttributeNamespace in interface javax.xml.stream.XMLStreamReader
Parameters:
index - the position of the attribute
Returns:
the namespace URI (can be null)
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

getAttributePrefix

public java.lang.String getAttributePrefix(int index)
Returns the prefix of this attribute at the provided index

Specified by:
getAttributePrefix in interface javax.xml.stream.XMLStreamReader
Parameters:
index - the position of the attribute
Returns:
the prefix of the attribute
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

getAttributeQName

public javax.xml.namespace.QName getAttributeQName(int index)
Returns the qname of the attribute at the provided index

Parameters:
index - the position of the attribute
Returns:
the QName of the attribute
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

getAttributeType

public java.lang.String getAttributeType(int index)
Returns the XML type of the attribute at the provided index

Specified by:
getAttributeType in interface javax.xml.stream.XMLStreamReader
Parameters:
index - the position of the attribute
Returns:
the XML type of the attribute
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

getAttributeValue

public java.lang.String getAttributeValue(int index)
Returns the value of the attribute at the index

Specified by:
getAttributeValue in interface javax.xml.stream.XMLStreamReader
Parameters:
index - the position of the attribute
Returns:
the attribute value
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

getAttributeValue

public java.lang.String getAttributeValue(java.lang.String namespaceURI,
                                          java.lang.String localName)
Specified by:
getAttributeValue in interface javax.xml.stream.XMLStreamReader
Parameters:
namespaceURI -
localName -
Returns:

getElementText

public java.lang.String getElementText()
                                throws javax.xml.stream.XMLStreamException
Reads the content of a text-only element. Precondition: the current event is START_ELEMENT. Postcondition: The current event is the corresponding END_ELEMENT.

Specified by:
getElementText in interface javax.xml.stream.XMLStreamReader
Throws:
javax.xml.stream.XMLStreamException - if the current event is not a START_ELEMENT or if a non text element is encountered

getLocation

public javax.xml.stream.Location getLocation()
Return the current location of the processor. If the Location is unknown the processor should return an implementation of Location that returns -1 for the location and null for the publicId and systemId. The location information is only valid until next() is called.

Specified by:
getLocation in interface javax.xml.stream.XMLStreamReader

getName

public javax.xml.namespace.QName getName()
Returns a QName for the current START_ELEMENT or END_ELEMENT event

Specified by:
getName in interface javax.xml.stream.XMLStreamReader
Returns:
the QName for the current START_ELEMENT or END_ELEMENT event

getNamespaceContext

public javax.xml.namespace.NamespaceContext getNamespaceContext()
Returns a read only namespace context for the current position. The context is transient and only valid until a call to next() changes the state of the reader.

Specified by:
getNamespaceContext in interface javax.xml.stream.XMLStreamReader
Returns:
return a namespace context

getNamespaceCount

public int getNamespaceCount()
Returns the count of namespaces declared on this START_ELEMENT or END_ELEMENT, this method is only valid on a START_ELEMENT, END_ELEMENT or NAMESPACE. On an END_ELEMENT the count is of the namespaces that are about to go out of scope. This is the equivalent of the information reported by SAX callback for an end element event.

Specified by:
getNamespaceCount in interface javax.xml.stream.XMLStreamReader
Returns:
returns the number of namespace declarations on this specific element
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT, END_ELEMENT or NAMESPACE

getNamespacePrefix

public java.lang.String getNamespacePrefix(int index)
Returns the prefix for the namespace declared at the index. Returns null if this is the default namespace declaration

Specified by:
getNamespacePrefix in interface javax.xml.stream.XMLStreamReader
Parameters:
index - the position of the namespace declaration
Returns:
returns the namespace prefix
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT, END_ELEMENT or NAMESPACE

getNamespaceURI

public java.lang.String getNamespaceURI(int index)
Returns the uri for the namespace declared at the index.

Specified by:
getNamespaceURI in interface javax.xml.stream.XMLStreamReader
Parameters:
index - the position of the namespace declaration
Returns:
returns the namespace uri
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT, END_ELEMENT or NAMESPACE

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws java.lang.IllegalArgumentException
Get the value of a feature/property from the underlying implementation

Specified by:
getProperty in interface javax.xml.stream.XMLStreamReader
Parameters:
name - The name of the property, may not be null
Returns:
The value of the property
Throws:
java.lang.IllegalArgumentException - if name is null

getText

public java.lang.String getText()
Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event, returns the value of a COMMENT, the replacement value for an ENTITY_REFERENCE, or the String value of the DTD

Specified by:
getText in interface javax.xml.stream.XMLStreamReader
Returns:
the current text or null
Throws:
java.lang.IllegalStateException - if this state is not a valid text state.

require

public void require(int type,
                    java.lang.String namespaceURI,
                    java.lang.String localName)
             throws javax.xml.stream.XMLStreamException
Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event. If the namespaceURI is null it is not checked for equality, if the localName is null it is not checked for equality.

Specified by:
require in interface javax.xml.stream.XMLStreamReader
Parameters:
type - the event type
namespaceURI - the uri of the event, may be null
localName - the localName of the event, may be null
Throws:
javax.xml.stream.XMLStreamException - if the required values are not matched.

getTextCharacters

public int getTextCharacters(int sourceStart,
                             char[] target,
                             int targetStart,
                             int length)
                      throws javax.xml.stream.XMLStreamException
Gets the the text associated with a CHARACTERS, SPACE or CDATA event. Text starting a "sourceStart" is copied into "destination" starting at "targetStart". Up to "length" characters are copied. The number of characters actually copied is returned. The "sourceStart" argument must be greater or equal to 0 and less than or equal to the number of characters associated with the event. Usually, one requests text starting at a "sourceStart" of 0. If the number of characters actually copied is less than the "length", then there is no more text. Otherwise, subsequent calls need to be made until all text has been retrieved. For example: int length = 1024; char[] myBuffer = new char[ length ]; for ( int sourceStart = 0 ; ; sourceStart += length ) { int nCopied = stream.getTextCharacters( sourceStart, myBuffer, 0, length ); if (nCopied < length) break; } XMLStreamException may be thrown if there are any XML errors in the underlying source. The "targetStart" argument must be greater than or equal to 0 and less than the length of "target", Length must be greater than 0 and "targetStart + length" must be less than or equal to length of "target".

Specified by:
getTextCharacters in interface javax.xml.stream.XMLStreamReader
Parameters:
sourceStart - the index of the first character in the source array to copy
target - the destination array
targetStart - the start offset in the target array
length - the number of characters to copy
Returns:
the number of characters actually copied
Throws:
javax.xml.stream.XMLStreamException - if the underlying XML source is not well-formed
java.lang.IndexOutOfBoundsException - if targetStart < 0 or > than the length of target
IndexOutOfBoundwhile(isCharacters()) - ;sException if length < 0 or targetStart + length > length of target
java.lang.UnsupportedOperationException - if this method is not supported
java.lang.NullPointerException - is if target is null

hasText

public boolean hasText()
Return true if the current event has text, false otherwise The following events have text: CHARACTERS,DTD ,ENTITY_REFERENCE, COMMENT

Specified by:
hasText in interface javax.xml.stream.XMLStreamReader

isAttributeSpecified

public boolean isAttributeSpecified(int index)
Returns a boolean which indicates if this attribute was created by default

Specified by:
isAttributeSpecified in interface javax.xml.stream.XMLStreamReader
Parameters:
index - the position of the attribute
Returns:
true if this is a default attribute
Throws:
java.lang.IllegalStateException - if this is not a START_ELEMENT or ATTRIBUTE

isCharacters

public boolean isCharacters()
Returns true if the cursor points to a character data event

Specified by:
isCharacters in interface javax.xml.stream.XMLStreamReader
Returns:
true if the cursor points to character data, false otherwise

nextTag

public int nextTag()
            throws javax.xml.stream.XMLStreamException
Skips any insignificant events (COMMENT and PROCESSING_INSTRUCTION) until a START_ELEMENT or END_ELEMENT is reached. If other than space characters are encountered, an exception is thrown. This method should be used when processing element-only content because the parser is not able to recognize ignorable whitespace if then DTD is missing or not interpreted.

Specified by:
nextTag in interface javax.xml.stream.XMLStreamReader
Returns:
the event type of the element read
Throws:
javax.xml.stream.XMLStreamException - if the current event is not white space

standaloneSet

public boolean standaloneSet()
Checks if standalone was set in the document

Specified by:
standaloneSet in interface javax.xml.stream.XMLStreamReader
Returns:
true if standalone was set in the document, or false otherwise

convertXNIQNametoJavaxQName

public javax.xml.namespace.QName convertXNIQNametoJavaxQName(org.apache.xerces.xni.QName qname)
Parameters:
qname -
Returns:

getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.String prefix)
Return the uri for the given prefix. The uri returned depends on the current state of the processor.

NOTE:The 'xml' prefix is bound as defined in Namespaces in XML specification to "http://www.w3.org/XML/1998/namespace".

NOTE: The 'xmlns' prefix must be resolved to following namespace http://www.w3.org/2000/xmlns/

Specified by:
getNamespaceURI in interface javax.xml.stream.XMLStreamReader
Parameters:
prefix - The prefix to lookup, may not be null
Returns:
the uri bound to the given prefix or null if it is not bound

setPropertyManager

protected void setPropertyManager(PropertyManager propertyManager)

getPropertyManager

protected PropertyManager getPropertyManager()
Returns:
returns the reference to property manager.

getEntityDecls

protected java.util.List getEntityDecls()

getNotationDecls

protected java.util.List getNotationDecls()


Copyright ? 2002-2003 Apache XML Project. All Rights Reserved.