first commit

This commit is contained in:
2025-07-28 13:56:49 +05:30
commit e9eb805edb
3438 changed files with 520990 additions and 0 deletions

View 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 {}
}