Package org.apache.commons.digester

Examples of org.apache.commons.digester.Digester.push()


            fis = new FileInputStream(pathname);
            bis = new BufferedInputStream(fis);

            // Construct a digester to use for parsing
            Digester digester = new Digester();
            digester.push(this);
            digester.setValidating(false);
            digester.addFactoryCreate
                ("database/user",
                 new MemoryUserCreationFactory(this));
            digester.addFactoryCreate
View Full Code Here


            stream = config.openStream();
            Digester digester = createDigester();
            digester.setDebug(host.getDebug());
            digester.setClassLoader(this.getClass().getClassLoader());
            digester.clear();
            digester.push(this);
            digester.parse(stream);
            stream.close();
            stream = null;
        } catch (Exception e) {
            host.log
View Full Code Here

            try {
                InputSource is =
                    new InputSource("file://" + file.getAbsolutePath());
                FileInputStream fis = new FileInputStream(file);
                is.setByteStream(fis);
                digester.push(this);
                digester.parse(is);
                fis.close();
            } catch (Exception e) {
                System.out.println("Catalina.stop: " + e);
                e.printStackTrace(System.out);
View Full Code Here

            return;
        }

        try {
            inputSource.setByteStream(inputStream);
            digester.push(this);
            digester.parse(inputSource);
            inputStream.close();
        } catch (Exception e) {
            System.out.println("Catalina.start: " + e);
            e.printStackTrace(System.out);
View Full Code Here

        Digester digester = this.initializeDigester();

        if (this.push) {
            log.debug("push == true; pushing plugin onto digester stack");
            digester.push(this);
        }

        try {
            log.debug("XML data file: [path: " + this.configPath + ", source: "
                + this.configSource + "]");
View Full Code Here

    private void parseConfig(String publicId, String entityURL,
        String strutsConfig) {
        // Prepare a Digester for parsing a struts-config.xml file
        Digester digester = new Digester();

        digester.push(config);
        digester.setNamespaceAware(true);
        digester.setValidating(true);
        digester.addRuleSet(new ConfigRuleSet());
        digester.register(publicId,
            this.getClass().getResource(entityURL).toString());
View Full Code Here

            fis = new FileInputStream(pathname);
            bis = new BufferedInputStream(fis);

            // Construct a digester to use for parsing
            Digester digester = new Digester();
            digester.push(this);
            digester.setValidating(false);
            digester.addFactoryCreate
                ("database/user",
                 new MemoryUserCreationFactory(this));
            digester.addFactoryCreate
View Full Code Here

   */  
   public static void initialize(ValidatorResources resources, InputStream in, boolean process)
      throws IOException {
        
      Digester digester = new Digester();
      digester.push(resources);
      digester.setNamespaceAware(true);
      digester.setValidating(false);
      // register DTDs
      for (int i = 0; i < registrations.length; i += 2) {
          URL url = ValidatorResourcesInitializer.class.getResource(registrations[i+1]);
View Full Code Here

   */  
   public static void initialize(ValidatorResources resources, InputStream in, boolean process)
      throws IOException {
        
      Digester digester = new Digester();
      digester.push(resources);
      digester.setNamespaceAware(true);
      digester.setValidating(false);
      // register DTDs
      for (int i = 0; i < registrations.length; i += 2) {
          URL url = ValidatorResourcesInitializer.class.getResource(registrations[i+1]);
View Full Code Here

        // Create and execute our Digester
        Digester digester = createStartDigester();
        File file = configFile();
        try {
            digester.push(this);
            digester.parse(file);
        } catch (Exception e) {
            System.out.println("Catalina.start: " + e);
            e.printStackTrace(System.out);
            System.exit(1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.