public class HTMLParser extends Object
(http://jtidy.sourceforge.net/)| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.impl.client.DefaultHttpClient |
httpClient |
static String |
NEWLINE |
protected XPathFactory |
xfactory |
protected XPath |
xpath |
| Constructor and Description |
|---|
HTMLParser() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeConnection()
schliesst die Verbindung.
|
String |
getURLAndContent(org.apache.http.HttpResponse response)
Gibt den Content der URL zurueck.
|
XPathExpression |
getXPathExpression(String pathString)
Liefert ein XPathExpression aus den String
|
NodeList |
getXPathLinks(String content,
XPathExpression xpath)
Filtert alle XPath-Links und gibt NodeList Zurueck.
|
void |
openConnection()
Erzeugt neue DefaultHttpClient.
|
org.apache.http.HttpResponse |
request(URL url)
Send the HTTP request and return an HTTP response
|
protected XPathFactory xfactory
protected XPath xpath
protected org.apache.http.impl.client.DefaultHttpClient httpClient
public static String NEWLINE
public void openConnection()
public void closeConnection()
public org.apache.http.HttpResponse request(URL url)
url - IOExceptionpublic String getURLAndContent(org.apache.http.HttpResponse response) throws IOException
URL - IOExceptionpublic XPathExpression getXPathExpression(String pathString)
String - xpathpublic NodeList getXPathLinks(String content, XPathExpression xpath)
String - contentXPathExpression - xpathCopyright © 2004-2013 New Image Systems GmbH. All Rights Reserved.