public class Parser
extends java.lang.Object
Constructor and Description |
---|
Parser(WebApp wapp,
Locator locator)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Locator |
getLocator()
returns locator for locating resources.
|
PageDefinition |
parse(Document doc,
java.lang.String extension)
Parse the raw content directly from a DOM tree.
|
PageDefinition |
parse(java.io.File file,
java.lang.String path)
Parses the specified file.
|
PageDefinition |
parse(java.io.Reader reader,
java.lang.String extension)
Parses from the specified reader.
|
PageDefinition |
parse(java.net.URL url,
java.lang.String path)
Parses the specified URL.
|
public PageDefinition parse(java.io.File file, java.lang.String path) throws java.lang.Exception
path
- the request path.
It is used as Page.getRequestPath()
, or null
if not available.java.lang.Exception
public PageDefinition parse(java.net.URL url, java.lang.String path) throws java.lang.Exception
path
- the request path.
It is used as Page.getRequestPath()
, or null
if not available.java.lang.Exception
public PageDefinition parse(java.io.Reader reader, java.lang.String extension) throws java.lang.Exception
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.java.lang.Exception
public PageDefinition parse(Document doc, java.lang.String extension) throws java.lang.Exception
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.java.lang.Exception
public Locator getLocator()
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.