de.innovationgate.wga.server.api
public class Html extends Object
Modifier and Type | Method and Description |
---|---|
org.dom4j.Document |
load(org.apache.commons.httpclient.HttpClient client,
String url)
Loads a HTML page from a URL and parses it as DOM document
|
org.dom4j.Document |
load(String url)
Loads a HTML page from a URL and parses it as DOM document
The HTML parser NekoHTML is responsible for parsing the HTML document as a DOM tree.
|
org.dom4j.Document |
parse(String html)
Parses HTML text and returns it as DOM document object.
|
org.dom4j.Document |
parseFragment(String html)
Parses HTML text and returns it as DOM document object.
|
public org.dom4j.Document load(String url) throws UnsupportedEncodingException, de.innovationgate.webgate.api.WGException, IOException, org.apache.commons.httpclient.HttpException, SAXException
url
- The URL to load the HTML document fromUnsupportedEncodingException
de.innovationgate.webgate.api.WGAPIException
IOException
org.apache.commons.httpclient.HttpException
SAXException
de.innovationgate.webgate.api.WGException
public org.dom4j.Document load(org.apache.commons.httpclient.HttpClient client, String url) throws UnsupportedEncodingException, de.innovationgate.webgate.api.WGException, IOException, org.apache.commons.httpclient.HttpException, SAXException
client
- HTTP client object to load the resource on the URL, used to specify various settings regarding this operation. If no client object is passed a default one is used.url
- The URL to load the HTML document fromUnsupportedEncodingException
de.innovationgate.webgate.api.WGAPIException
IOException
org.apache.commons.httpclient.HttpException
SAXException
de.innovationgate.webgate.api.WGException
public org.dom4j.Document parse(String html) throws de.innovationgate.webgate.api.WGException, SAXException, IOException
html
- SAXException
IOException
de.innovationgate.webgate.api.WGException
public org.dom4j.Document parseFragment(String html) throws de.innovationgate.webgate.api.WGException, SAXException, IOException
html
- SAXException
IOException
de.innovationgate.webgate.api.WGException