|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This service is responsible for locate and transform HTML content
Field Summary | |
static java.lang.String |
SERVICE_NAME
The name of this service |
Method Summary | |
java.lang.String |
clipElements(java.io.Reader htmlReader,
java.lang.String url,
java.lang.String startElement,
java.lang.String stopElement)
Clips the part of a web page between startElement and stopElement |
java.lang.String |
clipElementsNumber(java.io.Reader htmlReader,
java.lang.String url,
java.lang.String startElement,
java.lang.String stopElement,
int tagNumber)
Clips a part of a web page, starting from the "tagNumber" "startElement" Example: startElement = "p", tagNumber = "3", stopElement = "img" Page content: |
java.lang.String |
findElement(java.io.Reader htmlReader,
java.lang.String url,
java.lang.String element)
Finds an element in a web page |
java.lang.String |
findElementNumber(java.io.Reader htmlReader,
java.lang.String url,
java.lang.String element,
int tagNumber)
Finds in an HTML page the "tagNumber" tag of type "element" Example: element = "p", tagNumber = "3" Page content: |
Methods inherited from interface org.apache.turbine.services.Service |
getConfiguration, getName, getProperties, setName, setServiceBroker |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, init, init, setInitableBroker, shutdown |
Field Detail |
public static final java.lang.String SERVICE_NAME
Method Detail |
public java.lang.String findElement(java.io.Reader htmlReader, java.lang.String url, java.lang.String element)
htmlReader
- Reader for the html rewriterurl
- page addresselement
- the element to searchpublic java.lang.String clipElements(java.io.Reader htmlReader, java.lang.String url, java.lang.String startElement, java.lang.String stopElement)
htmlReader
- Reader for the html rewriterurl
- page addressstartElement
- the first element to clipstopElement
- the last element to clippublic java.lang.String findElementNumber(java.io.Reader htmlReader, java.lang.String url, java.lang.String element, int tagNumber)
..
..
.. <---Finds this
htmlReader
- Reader for the html rewriterurl
- page addresselement
- the element to searchtagNumber
- the number of the element to searchpublic java.lang.String clipElementsNumber(java.io.Reader htmlReader, java.lang.String url, java.lang.String startElement, java.lang.String stopElement, int tagNumber)
..
..
.. <---Starts here ........ <---Stops here
htmlReader
- Reader for the html rewriterurl
- page addressstartElement
- the first element to clipstopElement
- the last element to cliptagNumber
- the number of the first element to clip
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |