org.apache.xerces.impl
Class XMLVersionDetector
java.lang.Object
org.apache.xerces.impl.XMLVersionDetector
public class XMLVersionDetector
extends java.lang.Object
This class scans the version of the document to determine
which scanner to use: XML 1.1 or XML 1.0.
The version is scanned using XML 1.1. scanner.
$Id: XMLVersionDetector.java,v 1.14 2004/10/04 21:45:48 mrglavas Exp $- Neil Graham, IBM
- Elena Litani, IBM
short | determineDocVersion(org.apache.xerces.xni.parser.XMLInputSource inputSource) - This methods scans the XML declaration to find out the version
(and provisional encoding) of the document.
|
void | reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager)
|
void | startDocumentParsing(XMLEntityHandler scanner, short version) - Reset the reference to the appropriate scanner given the version of the
document and start document scanning.
|
ENTITY_MANAGER
protected static final String ENTITY_MANAGER
Property identifier: entity manager.
ERROR_REPORTER
protected static final String ERROR_REPORTER
Property identifier: error reporter.
SYMBOL_TABLE
protected static final String SYMBOL_TABLE
Property identifier: symbol table.
fEncoding
protected String fEncoding
fSymbolTable
protected SymbolTable fSymbolTable
Symbol table.
fVersionSymbol
protected static final String fVersionSymbol
Symbol: "version".
fXMLSymbol
protected static final String fXMLSymbol
determineDocVersion
public short determineDocVersion(org.apache.xerces.xni.parser.XMLInputSource inputSource)
throws IOException
This methods scans the XML declaration to find out the version
(and provisional encoding) of the document.
The scanning is doing using XML 1.1 scanner.
- short - Constants.XML_VERSION_1_1 if document version 1.1,
otherwise Constants.XML_VERSION_1_0
reset
public void reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager)
throws org.apache.xerces.xni.parser.XMLConfigurationException
componentManager
- The component manager.
startDocumentParsing
public void startDocumentParsing(XMLEntityHandler scanner,
short version)
Reset the reference to the appropriate scanner given the version of the
document and start document scanning.
scanner
- - the scanner to useversion
- - the version of the document (XML 1.1 or XML 1.0).
Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.