Package org.apache.xerces.impl
Class XMLVersionDetector
java.lang.Object
org.apache.xerces.impl.XMLVersionDetector
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.
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: XMLVersionDetector.java 699892 2008-09-28 21:08:27Z mrglavas $
- Author:
- Neil Graham, IBM, Elena Litani, IBM
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringProperty identifier: entity manager.protected static final StringProperty identifier: error reporter.protected Stringprotected XMLEntityManagerEntity manager.protected XMLErrorReporterError reporter.protected SymbolTableSymbol table.protected static final StringSymbol: "version".protected static final Stringprotected static final StringProperty identifier: symbol table. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshortdetermineDocVersion(org.apache.xerces.xni.parser.XMLInputSource inputSource) This methods scans the XML declaration to find out the version (and provisional encoding) of the document.voidreset(org.apache.xerces.xni.parser.XMLComponentManager componentManager) voidstartDocumentParsing(XMLEntityHandler scanner, short version) Reset the reference to the appropriate scanner given the version of the document and start document scanning.
-
Field Details
-
SYMBOL_TABLE
Property identifier: symbol table.- See Also:
-
ERROR_REPORTER
Property identifier: error reporter.- See Also:
-
ENTITY_MANAGER
Property identifier: entity manager.- See Also:
-
fVersionSymbol
Symbol: "version". -
fXMLSymbol
-
fSymbolTable
Symbol table. -
fErrorReporter
Error reporter. -
fEntityManager
Entity manager. -
fEncoding
-
-
Constructor Details
-
XMLVersionDetector
public XMLVersionDetector()
-
-
Method Details
-
reset
public void reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager) throws org.apache.xerces.xni.parser.XMLConfigurationException - Parameters:
componentManager- The component manager.- Throws:
org.apache.xerces.xni.XNIException- Throws exception if required features and properties cannot be found.org.apache.xerces.xni.parser.XMLConfigurationException
-
startDocumentParsing
Reset the reference to the appropriate scanner given the version of the document and start document scanning.- Parameters:
scanner- - the scanner to useversion- - the version of the document (XML 1.1 or XML 1.0).
-
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.- Parameters:
inputSource-- Returns:
- short - Constants.XML_VERSION_1_1 if document version 1.1, otherwise Constants.XML_VERSION_1_0
- Throws:
IOException
-