Class Parser

java.lang.Object
org.zkoss.zk.ui.metainfo.Parser

public class Parser extends Object
Used to parse the ZUL file
Author:
tomyeh
  • Field Details

  • Constructor Details

    • Parser

      public Parser(WebApp wapp, org.zkoss.util.resource.Locator locator)
      Constructor.
      Parameters:
      locator - the locator used to locate taglib and other resources. If null, wapp is assumed (WebApp is also assumed).
  • Method Details

    • parse

      public PageDefinition parse(File file, String path) throws Exception
      Parses the specified file.
      Parameters:
      path - the request path. It is used as Page.getRequestPath(), or null if not available.
      Throws:
      Exception
    • parse

      public PageDefinition parse(URL url, String path) throws Exception
      Parses the specified URL.
      Parameters:
      path - the request path. It is used as Page.getRequestPath(), or null if not available.
      Throws:
      Exception
    • parse

      public PageDefinition parse(Reader reader, String extension) throws Exception
      Parses from the specified reader.
      Parameters:
      extension - the default extension if doc (of reader) doesn't specify an language. Ignored if null. If extension is null and the content doesn't specify a language, the language called "xul/html" is assumed.
      Throws:
      Exception
    • parse

      public PageDefinition parse(org.zkoss.idom.Document doc, String extension) throws Exception
      Parse the raw content directly from a DOM tree.
      Parameters:
      extension - the default extension if doc doesn't specify an language. Ignored if null. If extension is null and the content doesn't specify a language, the language called "xul/html" is assumed.
      Throws:
      Exception
    • getLocator

      public org.zkoss.util.resource.Locator getLocator()
      returns locator for locating resources.