org.millscript.commons.xml.tokenizer
Class Xml11Tokenizer

java.lang.Object
  extended by org.millscript.commons.xml.tokenizer.AbstractXmlTokenizerImpl
      extended by org.millscript.commons.xml.tokenizer.Xml11Tokenizer
All Implemented Interfaces:
XmlTokenizer

public class Xml11Tokenizer
extends AbstractXmlTokenizerImpl

This class provides an XmlTokenizer implementation for tokenizing an XML 1.1 document.


Field Summary
 
Fields inherited from class org.millscript.commons.xml.tokenizer.AbstractXmlTokenizerImpl
columnNumber, lineNumber
 
Constructor Summary
Xml11Tokenizer(AbstractXmlTokenizerImpl a)
          Constructs a new XML 1.0 tokenizer which will copy it's state from the specified existing tokenizer.
Xml11Tokenizer(AbstractXmlTokenizerImpl a, java.io.Reader r)
          Constructs a new XML 1.0 tokenizer which will copy it's state from the specified existing tokenizer, but will use the specified reader instead of the one from the existing tokenizer.
Xml11Tokenizer(java.io.InputStream is, java.nio.charset.Charset cs, boolean namespaceAware)
          Constructs a new XML 1.1 tokenizer to read from the specified input stream, using the specified character set, with optional namespace support.
Xml11Tokenizer(java.io.Reader r, boolean namespaceAware)
          Constructs a new XML 1.0 tokenizer to read from the specified reader, with optional namespace support.
 
Method Summary
 int handleIntChar(int ch)
          Handles the specified character, performing any XML version dependent line break conversions and checks on it's validity.
 boolean isChar(int ch)
          Tests if the specified character matches the Char production in the XML specification.
 boolean isNameChar(char ch)
          Tests if the specified character matches the NameChar production in the XML specification.
 boolean isNameStartChar(char ch)
          Tests if the specified character matches the NameStartChar production in the XML specification.
 boolean isRestrictedChar(int ch)
          Tests if the specified character matches the RestrictedChar production in the XML specification.
 
Methods inherited from class org.millscript.commons.xml.tokenizer.AbstractXmlTokenizerImpl
appendCurrentTokenData, dropS, getChar, getIntChar, getLineNumber, getQuoteChar, hasNextToken, isNCNameChar, isNCNameStartChar, isS, mustRead, mustReadEq, mustReadS, nextToken, peekRead, peekS, pushBack, pushBack, readAttlistDecl, readAttValue, readCDSect, readCharData, readComment, readDoctypeDecl, readElementDecl, readEncodingDecl, readEntityDecl, readETag, readIntSubset, readNmtoken, readNotationDecl, readPI, readPubidLiteral, readReference, readSDDecl, readSTag, readSystemLiteral, readVersionInfo, setNamespaces, tryRead, tryRead, tryReadS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Xml11Tokenizer

public Xml11Tokenizer(java.io.InputStream is,
                      java.nio.charset.Charset cs,
                      boolean namespaceAware)
Constructs a new XML 1.1 tokenizer to read from the specified input stream, using the specified character set, with optional namespace support.

Parameters:
is - the InputStream to read from
cs - the Charset to decode the InputStream with
namespaceAware - indicates if the tokenizer should be namespace aware

Xml11Tokenizer

public Xml11Tokenizer(java.io.Reader r,
                      boolean namespaceAware)
Constructs a new XML 1.0 tokenizer to read from the specified reader, with optional namespace support.

Parameters:
r - the Reader to obtain characters from
namespaceAware - indicates if the tokenizer should be namespace aware

Xml11Tokenizer

public Xml11Tokenizer(AbstractXmlTokenizerImpl a)
Constructs a new XML 1.0 tokenizer which will copy it's state from the specified existing tokenizer.

Parameters:
a - the existing tokenizer to copy state from

Xml11Tokenizer

public Xml11Tokenizer(AbstractXmlTokenizerImpl a,
                      java.io.Reader r)
Constructs a new XML 1.0 tokenizer which will copy it's state from the specified existing tokenizer, but will use the specified reader instead of the one from the existing tokenizer.

Parameters:
a - the existing tokenizer to copy state from
r - the new reader this tokenizer should read characters from
Method Detail

handleIntChar

public int handleIntChar(int ch)
Description copied from class: AbstractXmlTokenizerImpl
Handles the specified character, performing any XML version dependent line break conversions and checks on it's validity.

Specified by:
handleIntChar in class AbstractXmlTokenizerImpl
Parameters:
ch - the character to test
Returns:
the handled character, which may not be the same as that supplied as the argument
See Also:
AbstractXmlTokenizerImpl.handleIntChar(int)

isChar

public boolean isChar(int ch)
Description copied from class: AbstractXmlTokenizerImpl
Tests if the specified character matches the Char production in the XML specification.

Specified by:
isChar in class AbstractXmlTokenizerImpl
Parameters:
ch - the character to test
Returns:
true if the character is a Char and false otherwise
See Also:
AbstractXmlTokenizerImpl.isChar(int)

isNameChar

public boolean isNameChar(char ch)
Description copied from class: AbstractXmlTokenizerImpl
Tests if the specified character matches the NameChar production in the XML specification.

Specified by:
isNameChar in class AbstractXmlTokenizerImpl
Parameters:
ch - the character to test
Returns:
true if the character is a NameChar and false otherwise
See Also:
AbstractXmlTokenizerImpl.isNameChar(char)

isNameStartChar

public boolean isNameStartChar(char ch)
Description copied from class: AbstractXmlTokenizerImpl
Tests if the specified character matches the NameStartChar production in the XML specification.

Specified by:
isNameStartChar in class AbstractXmlTokenizerImpl
Parameters:
ch - the character to test
Returns:
true if the character is a NameStartChar and false otherwise
See Also:
AbstractXmlTokenizerImpl.isNameStartChar(char)

isRestrictedChar

public boolean isRestrictedChar(int ch)
Tests if the specified character matches the RestrictedChar production in the XML specification.

Parameters:
ch - the character to test
Returns:
true if the character is a RestrictedChar and false otherwise


Copyright © 2005-2007 Open World Ltd. All Rights Reserved.