home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / parser.jar / com / sun / xml / parser / SAXParserImpl.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-02-23  |  1.1 KB  |  41 lines

  1. package com.sun.xml.parser;
  2.  
  3. import javax.xml.parsers.ParserConfigurationException;
  4. import javax.xml.parsers.SAXParser;
  5. import javax.xml.parsers.SAXParserFactory;
  6. import org.xml.sax.SAXException;
  7.  
  8. public class SAXParserImpl extends SAXParser {
  9.    private SAXParserFactory spf = null;
  10.    private Parser parser = null;
  11.    private boolean validating = false;
  12.    private boolean namespaceAware = false;
  13.  
  14.    SAXParserImpl(SAXParserFactory var1) throws SAXException, ParserConfigurationException {
  15.       this.spf = var1;
  16.       if (var1.isValidating()) {
  17.          this.parser = new ValidatingParser();
  18.          this.validating = true;
  19.       } else {
  20.          this.parser = new Parser();
  21.       }
  22.  
  23.       if (var1.isNamespaceAware()) {
  24.          this.namespaceAware = true;
  25.          throw new ParserConfigurationException("Namespace not supported by SAXParser");
  26.       }
  27.    }
  28.  
  29.    public org.xml.sax.Parser getParser() throws SAXException {
  30.       return this.parser;
  31.    }
  32.  
  33.    public boolean isNamespaceAware() {
  34.       return this.namespaceAware;
  35.    }
  36.  
  37.    public boolean isValidating() {
  38.       return this.validating;
  39.    }
  40. }
  41.