home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / jaxp.jar / javax / xml / parsers / DocumentBuilderFactory.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-02-23  |  1.5 KB  |  44 lines

  1. package javax.xml.parsers;
  2.  
  3. public abstract class DocumentBuilderFactory {
  4.    private boolean validating = false;
  5.    private boolean namespaceAware = false;
  6.  
  7.    protected DocumentBuilderFactory() {
  8.    }
  9.  
  10.    public boolean isNamespaceAware() {
  11.       return this.namespaceAware;
  12.    }
  13.  
  14.    public boolean isValidating() {
  15.       return this.validating;
  16.    }
  17.  
  18.    public abstract DocumentBuilder newDocumentBuilder() throws ParserConfigurationException;
  19.  
  20.    public static DocumentBuilderFactory newInstance() {
  21.       String var0 = System.getProperty("javax.xml.parsers.DocumentBuilderFactory", "com.sun.xml.parser.DocumentBuilderFactoryImpl");
  22.  
  23.       try {
  24.          Class var2 = Class.forName(var0);
  25.          DocumentBuilderFactory var1 = (DocumentBuilderFactory)var2.newInstance();
  26.          return var1;
  27.       } catch (ClassNotFoundException var3) {
  28.          throw new FactoryConfigurationError(var3);
  29.       } catch (IllegalAccessException var4) {
  30.          throw new FactoryConfigurationError(var4);
  31.       } catch (InstantiationException var5) {
  32.          throw new FactoryConfigurationError(var5);
  33.       }
  34.    }
  35.  
  36.    public void setNamespaceAware(boolean var1) {
  37.       this.namespaceAware = var1;
  38.    }
  39.  
  40.    public void setValidating(boolean var1) {
  41.       this.validating = var1;
  42.    }
  43. }
  44.