first commit
This commit is contained in:
28
hrmsEjb/org/apache/xerces/parsers/XMLParser.java
Normal file
28
hrmsEjb/org/apache/xerces/parsers/XMLParser.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package org.apache.xerces.parsers;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.xerces.xni.XNIException;
|
||||
import org.apache.xerces.xni.parser.XMLInputSource;
|
||||
import org.apache.xerces.xni.parser.XMLParserConfiguration;
|
||||
|
||||
public abstract class XMLParser {
|
||||
protected static final String ENTITY_RESOLVER = "http://apache.org/xml/properties/internal/entity-resolver";
|
||||
|
||||
protected static final String ERROR_HANDLER = "http://apache.org/xml/properties/internal/error-handler";
|
||||
|
||||
private static final String[] RECOGNIZED_PROPERTIES = new String[] { "http://apache.org/xml/properties/internal/entity-resolver", "http://apache.org/xml/properties/internal/error-handler" };
|
||||
|
||||
protected XMLParserConfiguration fConfiguration;
|
||||
|
||||
protected XMLParser(XMLParserConfiguration config) {
|
||||
this.fConfiguration = config;
|
||||
this.fConfiguration.addRecognizedProperties(RECOGNIZED_PROPERTIES);
|
||||
}
|
||||
|
||||
public void parse(XMLInputSource inputSource) throws XNIException, IOException {
|
||||
reset();
|
||||
this.fConfiguration.parse(inputSource);
|
||||
}
|
||||
|
||||
protected void reset() throws XNIException {}
|
||||
}
|
Reference in New Issue
Block a user