home *** CD-ROM | disk | FTP | other *** search
- package com.sun.xml.parser;
-
- import javax.xml.parsers.ParserConfigurationException;
- import javax.xml.parsers.SAXParser;
- import javax.xml.parsers.SAXParserFactory;
- import org.xml.sax.SAXException;
-
- public class SAXParserImpl extends SAXParser {
- private SAXParserFactory spf = null;
- private Parser parser = null;
- private boolean validating = false;
- private boolean namespaceAware = false;
-
- SAXParserImpl(SAXParserFactory var1) throws SAXException, ParserConfigurationException {
- this.spf = var1;
- if (var1.isValidating()) {
- this.parser = new ValidatingParser();
- this.validating = true;
- } else {
- this.parser = new Parser();
- }
-
- if (var1.isNamespaceAware()) {
- this.namespaceAware = true;
- throw new ParserConfigurationException("Namespace not supported by SAXParser");
- }
- }
-
- public org.xml.sax.Parser getParser() throws SAXException {
- return this.parser;
- }
-
- public boolean isNamespaceAware() {
- return this.namespaceAware;
- }
-
- public boolean isValidating() {
- return this.validating;
- }
- }
-