Package org.apache.commons.jelly.parser

Examples of org.apache.commons.jelly.parser.XMLParser


        if (! loadedProperties) {
            loadedProperties = true;
            loadJellyProperties();
        }
       
        XMLParser parser = new XMLParser();
        try {
            parser.setContext(getJellyContext());
        } catch (MalformedURLException e) {
            throw new JellyException(e.toString());
        }
       
        Script script = null;
        try {
            parser.setDefaultNamespaceURI(this.defaultNamespaceURI);
            parser.setValidating(this.validateXML);
            script = parser.parse(getUrl());
            script = script.compile();
            if (log.isDebugEnabled()) {
               log.debug("Compiled script: " + getUrl());
            }
        } catch (IOException e) {
View Full Code Here


    /**
     * Attempts to parse the script from the given uri using the
     * {#link getResource()} method then returns the compiled script.
     */
    public Script compileScript(String uri) throws Exception {
        XMLParser parser = new XMLParser();
        parser.setContext(this);
        InputStream in = getResourceAsStream(uri);
        if (in == null) {
            throw new JellyException("Could not find Jelly script: " + uri);
        }
        Script script = parser.parse(in);
        return script.compile();
    }
View Full Code Here

    /**
     * Attempts to parse the script from the given URL using the
     * {#link getResource()} method then returns the compiled script.
     */
    public Script compileScript(URL url) throws Exception {
        XMLParser parser = new XMLParser();
        parser.setContext(this);
        Script script = parser.parse(url.toString());
        return script.compile();
    }
View Full Code Here

   
    /**
     * Compiles the script
     */
    public Script compileScript() throws Exception {
        XMLParser parser = new XMLParser();
        parser.setContext(getJellyContext());
        Script script = parser.parse(getUrl().openStream());
        script = script.compile();
        if (log.isDebugEnabled()) {
            log.debug("Compiled script: " + getUrl());
        }
        return script;
View Full Code Here

   
    /**
     * Compiles the script
     */
    protected Script compileScript() throws Exception {
        XMLParser parser = new XMLParser();
        parser.setContext(getJellyContext());
        Script script = parser.parse(getUrl().toString());
        script = script.compile();
        if (log.isDebugEnabled()) {
            log.debug("Compiled script: " + getUrl());
        }
        return script;
View Full Code Here

TOP

Related Classes of org.apache.commons.jelly.parser.XMLParser

Copyright © 2018 www.massapicom. 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.