Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl

public Class XML11EntityScanner

extends XMLEntityScanner
Class Inheritance
Static Imports
com.sun.org.apache.xerces.internal.impl.Constants.XML_VERSION_1_1

Implements the entity scanner methods in the context of XML 1.1.
Authors
Michael Glavassevich, IBM, Neil Graham, IBM

Field Summary

Inherited from com.sun.org.apache.xerces.internal.impl.XMLEntityScanner:
ALLOW_JAVA_ENCODINGScounteddetectingVersionERROR_REPORTERfAllowJavaEncodingsfBufferSizefCurrentEntityfEntityManagerfErrorReporterfLimitAnalyzerfPropertyManagerfSecurityManagerfSymbolTableisExternalnewlinesoffsetSYMBOL_TABLEwhiteSpaceInfoNeededwhiteSpaceLenwhiteSpaceLookupxmlVersionSetExplicitly

Constructor Summary

AccessConstructor and Description
public
XML11EntityScanner()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public int
peekChar()

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.peekChar.

Returns the next character on the input.
protected int
scanChar(XMLScanner.NameType
The type of the name (element or attribute)
nt
)

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanChar.

Returns the next character on the input.
protected int

Returns:

Returns the next character on the input, if known. This value may be -1 but this does note designate end of file.
scanContent
(XMLString
The content structure to fill.
content
)

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanContent.

Scans a range of parsed character data, setting the fields of the XMLString structure, appropriately.
protected boolean

Returns:

Returns true if there is more data to scan, false otherwise.
scanData
(String
The string that signifies the end of the character data to be scanned.
delimiter
,
XMLStringBuffer
The data structure to fill.
buffer
,
int
the size limit of the data to be scanned
chunkLimit
)

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData.

Scans a range of character data up to the specicied delimiter, setting the fields of the XMLString structure, appropriately.
protected int

Returns:

Returns the next character on the input, if known. This value may be -1 but this does note designate end of file.
scanLiteral
(int
The quote character that signifies the end of the attribute value data.
quote
,
XMLString
The content structure to fill.
content
,
boolean
a flag indicating whether the content is a Namespace URI
isNSURI
)

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanLiteral.

Scans a range of attribute value data, setting the fields of the XMLString structure, appropriately.
protected String
scanName(XMLScanner.NameType
The type of the name (element or attribute)
nt
)

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanName.

Returns a string matching the Name production appearing immediately on the input as a symbol, or null if no Name string is present.
protected String
scanNCName()

Returns a string matching the NCName production appearing immediately on the input as a symbol, or null if no NCName string is present.

protected String
scanNmtoken()

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanNmtoken.

Returns a string matching the NMTOKEN production appearing immediately on the input as a symbol, or null if NMTOKEN Name string is present.
protected boolean

Returns:

Returns true if a qualified name appeared immediately on the input and was scanned, false otherwise.
scanQName
(QName
The qualified name structure to fill.
qname
,
XMLScanner.NameType
The type of the name (element or attribute)
nt
)

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanQName.

Scans a qualified name from the input, setting the fields of the QName structure appropriately.
protected boolean

Returns:

Returns true if the character was skipped.
skipChar
(int
The character to skip.
c
,
XMLScanner.NameType
The type of the name (element or attribute)
nt
)

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar.

Skips a character appearing immediately on the input.
protected boolean

Returns:

Returns true if at least one space character was skipped.
skipSpaces
()

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces.

Skips space characters appearing immediately on the input.
protected boolean

Returns:

Returns true if the string was skipped.
skipString
(String
The string to skip.
s
)

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString.

Skips the specified string appearing immediately on the input.
Inherited from com.sun.org.apache.xerces.internal.impl.XMLEntityScanner:
arrangeCapacityarrangeCapacitycheckBeforeLoadcheckEntityLimitcheckLimitcheckNodeCountcreateReadergetBaseSystemIdgetChargetCharacterOffsetgetColumnNumbergetCurrentEntitygetEncodinggetEncodingNamegetExpandedSystemIdgetLineNumbergetLiteralSystemIdgetPublicIdgetVersiongetXMLVersioninvokeListenersisExternalisSpaceloadnormalizeNewlinesprintregisterListenerresetresetresetsetBaseSystemIdsetBufferSizesetColumnNumbersetCurrentEntitysetEncodingsetExpandedSystemIdsetLineNumbersetLiteralSystemIdsetPublicIdsetVersionsetXMLVersionskipDeclSpacesskipStringstoreWhiteSpace

Constructor Detail

XML11EntityScannerback to summary
public XML11EntityScanner()

Default constructor.

Method Detail

peekCharback to summary
public int peekChar() throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.peekChar.

Returns the next character on the input.

Note

The character is not consumed.

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.
scanCharback to summary
protected int scanChar(XMLScanner.NameType nt) throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanChar.

Returns the next character on the input.

Note

The character is consumed.

Parameters
nt:XMLScanner.NameType

Doc from com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanChar.

The type of the name (element or attribute)

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.
scanContentback to summary
protected int scanContent(XMLString content) throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanContent.

Scans a range of parsed character data, setting the fields of the XMLString structure, appropriately.

Note

The characters are consumed.

Note

This method does not guarantee to return the longest run of parsed character data. This method may return before markup due to reaching the end of the input buffer or any other reason.

Note

The fields contained in the XMLString structure are not guaranteed to remain valid upon subsequent calls to the entity scanner. Therefore, the caller is responsible for immediately using the returned character data or making a copy of the character data.

Parameters
content:XMLString

The content structure to fill.

Returns:int

Returns the next character on the input, if known. This value may be -1 but this does note designate end of file.

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.
scanDataback to summary
protected boolean scanData(String delimiter, XMLStringBuffer buffer, int chunkLimit) throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData.

Scans a range of character data up to the specicied delimiter, setting the fields of the XMLString structure, appropriately.

Note

The characters are consumed.

Note

This assumes that the internal buffer is at least the same size, or bigger, than the length of the delimiter and that the delimiter contains at least one character.

Note

This method does not guarantee to return the longest run of character data. This method may return before the delimiter due to reaching the end of the input buffer or any other reason.

Note

The fields contained in the XMLString structure are not guaranteed to remain valid upon subsequent calls to the entity scanner. Therefore, the caller is responsible for immediately using the returned character data or making a copy of the character data.

Parameters
delimiter:String

The string that signifies the end of the character data to be scanned.

buffer:XMLStringBuffer

The data structure to fill.

chunkLimit:int

the size limit of the data to be scanned

Returns:boolean

Returns true if there is more data to scan, false otherwise.

Exceptions
IOException:
Thrown if i/o error occurs.
scanLiteralback to summary
protected int scanLiteral(int quote, XMLString content, boolean isNSURI) throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanLiteral.

Scans a range of attribute value data, setting the fields of the XMLString structure, appropriately.

Note

The characters are consumed.

Note

This method does not guarantee to return the longest run of attribute value data. This method may return before the quote character due to reaching the end of the input buffer or any other reason.

Note

The fields contained in the XMLString structure are not guaranteed to remain valid upon subsequent calls to the entity scanner. Therefore, the caller is responsible for immediately using the returned character data or making a copy of the character data.

Parameters
quote:int

The quote character that signifies the end of the attribute value data.

content:XMLString

The content structure to fill.

isNSURI:boolean

a flag indicating whether the content is a Namespace URI

Returns:int

Returns the next character on the input, if known. This value may be -1 but this does note designate end of file.

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.
scanNameback to summary
protected String scanName(XMLScanner.NameType nt) throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanName.

Returns a string matching the Name production appearing immediately on the input as a symbol, or null if no Name string is present.

Note

The Name characters are consumed.

Note

The string returned must be a symbol. The SymbolTable can be used for this purpose.

Parameters
nt:XMLScanner.NameType

The type of the name (element or attribute)

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.
See Also
com.sun.org.apache.xerces.internal.util.SymbolTable, com.sun.org.apache.xerces.internal.util.XML11Char#isXML11Name, com.sun.org.apache.xerces.internal.util.XML11Char#isXML11NameStart
scanNCNameback to summary
protected String scanNCName() throws IOException

Returns a string matching the NCName production appearing immediately on the input as a symbol, or null if no NCName string is present.

Note

The NCName characters are consumed.

Note

The string returned must be a symbol. The SymbolTable can be used for this purpose.

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.
See Also
com.sun.org.apache.xerces.internal.util.SymbolTable, com.sun.org.apache.xerces.internal.util.XML11Char#isXML11NCName, com.sun.org.apache.xerces.internal.util.XML11Char#isXML11NCNameStart
scanNmtokenback to summary
protected String scanNmtoken() throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanNmtoken.

Returns a string matching the NMTOKEN production appearing immediately on the input as a symbol, or null if NMTOKEN Name string is present.

Note

The NMTOKEN characters are consumed.

Note

The string returned must be a symbol. The SymbolTable can be used for this purpose.

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.
See Also
com.sun.org.apache.xerces.internal.util.SymbolTable, com.sun.org.apache.xerces.internal.util.XML11Char#isXML11Name
scanQNameback to summary
protected boolean scanQName(QName qname, XMLScanner.NameType nt) throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanQName.

Scans a qualified name from the input, setting the fields of the QName structure appropriately.

Note

The qualified name characters are consumed.

Note

The strings used to set the values of the QName structure must be symbols. The SymbolTable can be used for this purpose.

Parameters
qname:QName

The qualified name structure to fill.

nt:XMLScanner.NameType

The type of the name (element or attribute)

Returns:boolean

Returns true if a qualified name appeared immediately on the input and was scanned, false otherwise.

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.
See Also
com.sun.org.apache.xerces.internal.util.SymbolTable, com.sun.org.apache.xerces.internal.util.XML11Char#isXML11Name, com.sun.org.apache.xerces.internal.util.XML11Char#isXML11NameStart
skipCharback to summary
protected boolean skipChar(int c, XMLScanner.NameType nt) throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar.

Skips a character appearing immediately on the input.

Note

The character is consumed only if it matches the specified character.

Parameters
c:int

The character to skip.

nt:XMLScanner.NameType

Doc from com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar.

The type of the name (element or attribute)

Returns:boolean

Returns true if the character was skipped.

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.
skipSpacesback to summary
protected boolean skipSpaces() throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces.

Skips space characters appearing immediately on the input.

Note

The characters are consumed only if they are space characters.

Returns:boolean

Returns true if at least one space character was skipped.

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.
See Also
com.sun.org.apache.xerces.internal.util.XMLChar#isSpace, com.sun.org.apache.xerces.internal.util.XML11Char#isXML11Space
skipStringback to summary
protected boolean skipString(String s) throws IOException

Overrides com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString.

Skips the specified string appearing immediately on the input.

Note

The characters are consumed only if they are space characters.

Parameters
s:String

The string to skip.

Returns:boolean

Returns true if the string was skipped.

Exceptions
IOException:
Thrown if i/o error occurs.
EOFException:
Thrown on end of file.