Package org.zkoss.idom.input

Examples of org.zkoss.idom.input.SAXBuilder


        for (Enumeration en = loc.getResources("metainfo/tld/config.xml");
        en.hasMoreElements();) {
          final URL url = (URL)en.nextElement();
          if (log.debugable()) log.debug("Loading "+url);
          try {
            final Document doc = new SAXBuilder(false, false, true).build(url);
            if (IDOMs.checkVersion(doc, url))
              parseConfig(urls, doc.getRootElement(), loc);
          } catch (Exception ex) {
            log.error("Failed to parse "+url, ex); //keep running
          }
View Full Code Here


  private static class TaglibLoader extends AbstractLoader {
    //-- Loader --//
    public Object load(Object src) throws Exception {
      final Element root =
        new SAXBuilder(true, false, true).build((URL)src).getRootElement();
      return Taglibs.load(root);
    }
View Full Code Here

    private final List depends;
    private XMLResource(URL url, String elName, String elDepends)
    throws IOException{
      if (D.ON && log.debugable()) log.debug("Loading "+url);
      try {
        this.document = new SAXBuilder(false, false, true).build(url);
      } catch (Exception ex) {
        if (ex instanceof IOException) throw (IOException)ex;
        if (ex instanceof RuntimeException) throw (RuntimeException)ex;
        final IOException ioex = new IOException("Unable to load "+url);
        ioex.initCause(ex);
View Full Code Here

    if (xmlURL == null)
      throw new SystemException("File not found: "+APP_XML);

//    if (log.debugable()) log.debug("Parsing "+APP_XML);
    final Element root =
      new SAXBuilder(false,false,true).build(xmlURL).getRootElement();

    for (Iterator it = root.getElements("module").iterator();
    it.hasNext();) {
      final Element e = (Element)it.next();
      final String ctxroot = (String)e.getContent("web/context-root");
View Full Code Here

  }

  @Override
  public Configuration parse(URL url, Locator loc) throws Exception {
    try {
      return parse(new SAXBuilder(true, false, true).build(url).getRootElement(), loc);
    } catch (Throwable ex) {
      log.realCauseBriefly("Failed to parse "+url, ex);
      if (ex instanceof Error) throw (Error)ex;
      throw (Exception)ex;
    }
View Full Code Here

TOP

Related Classes of org.zkoss.idom.input.SAXBuilder

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.