Code example for SAXParser

Methods: getParser

0
    SAXParserFactory spf = SAXParserFactory.newInstance();
    spf.setNamespaceAware(namespaceAware);
    spf.setValidating(validating);
 
    try { 
      saxParser = spf.newSAXParser();
      parser = saxParser.getParser();
      documentHandler = null;
      dtdHandler = null;
    } catch (Exception ex) {
      ex.printStackTrace();
    } 
  } 
 
  /** Return the Catalog being used. */ 
  public Catalog getCatalog() { 
    return catalogResolver.getCatalog();
  } 
 
  /** 
   * SAX Parser API.