|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Text | |
org.htmlparser | The basic API classes which will be used by most developers when working with the HTML Parser. |
org.htmlparser.beans | The beans package contains Java Beans using the HTML Parser. |
org.htmlparser.lexer | The lexer package is the base level I/O subsystem. |
org.htmlparser.nodeDecorators | The nodeDecorators package contains classes that use the Decorator pattern. |
org.htmlparser.nodes | The nodes package has the concrete node implementations. |
org.htmlparser.tags | The tags package contains specific tags. |
org.htmlparser.visitors | The visitors package contains classes that use the Visitor pattern. |
Uses of Text in org.htmlparser |
Fields in org.htmlparser declared as Text | |
protected Text |
PrototypicalNodeFactory.mText
The prototypical text node. |
Methods in org.htmlparser that return Text | |
Text |
NodeFactory.createStringNode(Page page,
int start,
int end)
Create a new text node. |
Text |
PrototypicalNodeFactory.getTextPrototype()
Get the object that is cloned to generate text nodes. |
Text |
PrototypicalNodeFactory.createStringNode(Page page,
int start,
int end)
Create a new string node. |
Text |
StringNodeFactory.createStringNode(Page page,
int start,
int end)
Deprecated. Create a new string node. |
Methods in org.htmlparser with parameters of type Text | |
void |
PrototypicalNodeFactory.setTextPrototype(Text text)
Set the object to be used to generate text nodes. |
Uses of Text in org.htmlparser.beans |
Methods in org.htmlparser.beans with parameters of type Text | |
void |
StringBean.visitStringNode(Text string)
Appends the text to the output. |
Uses of Text in org.htmlparser.lexer |
Methods in org.htmlparser.lexer that return Text | |
Text |
Lexer.createStringNode(Page page,
int start,
int end)
Create a new string node. |
Uses of Text in org.htmlparser.nodeDecorators |
Classes in org.htmlparser.nodeDecorators that implement Text | |
class |
AbstractNodeDecorator
Deprecated. Use direct subclasses or dynamic proxies instead. Use either direct subclasses of the appropriate node and set them on the
Here is an example of how to use dynamic proxies to accomplish the same effect as using decorators to wrap Text nodes: import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import org.htmlparser.Parser; import org.htmlparser.PrototypicalNodeFactory; import org.htmlparser.Text; import org.htmlparser.nodes.TextNode; import org.htmlparser.util.ParserException; public class TextProxy implements InvocationHandler { protected Object mObject; public static Object newInstance (Object object) { Class cls; cls = object.getClass (); return (Proxy.newProxyInstance ( cls.getClassLoader (), cls.getInterfaces (), new TextProxy (object))); } private TextProxy (Object object) { mObject = object; } public Object invoke (Object proxy, Method m, Object[] args) throws Throwable { Object result; String name; try { result = m.invoke (mObject, args); name = m.getName (); if (name.equals ("clone")) result = newInstance (result); // wrap the cloned object else if (name.equals ("doSemanticAction")) // or other methods System.out.println (mObject); // do the needful on the TextNode } catch (InvocationTargetException e) { throw e.getTargetException (); } catch (Exception e) { throw new RuntimeException ("unexpected invocation exception: " + e.getMessage()); } finally { } return (result); } public static void main (String[] args) throws ParserException { // create the wrapped text node and set it as the prototype Text text = (Text) TextProxy.newInstance (new TextNode (null, 0, 0)); PrototypicalNodeFactory factory = new PrototypicalNodeFactory (); factory.setTextPrototype (text); // perform the parse Parser parser = new Parser (args[0]); parser.setNodeFactory (factory); parser.parse (null); } } |
class |
DecodingNode
Deprecated. Use direct subclasses or dynamic proxies instead. Use either direct subclasses of the appropriate node and set them on the
|
class |
EscapeCharacterRemovingNode
Deprecated. Use direct subclasses or dynamic proxies instead. Use either direct subclasses of the appropriate node and set them on the
|
class |
NonBreakingSpaceConvertingNode
Deprecated. Use direct subclasses or dynamic proxies instead. Use either direct subclasses of the appropriate node and set them on the
|
Fields in org.htmlparser.nodeDecorators declared as Text | |
protected Text |
AbstractNodeDecorator.delegate
Deprecated. |
Constructors in org.htmlparser.nodeDecorators with parameters of type Text | |
AbstractNodeDecorator(Text delegate)
Deprecated. |
|
DecodingNode(Text node)
Deprecated. |
|
EscapeCharacterRemovingNode(Text newDelegate)
Deprecated. |
|
NonBreakingSpaceConvertingNode(Text newDelegate)
Deprecated. |
Uses of Text in org.htmlparser.nodes |
Classes in org.htmlparser.nodes that implement Text | |
class |
TextNode
Normal text in the HTML document is represented by this class. |
Uses of Text in org.htmlparser.tags |
Methods in org.htmlparser.tags that return Text | |
Text[] |
CompositeTag.digupStringNode(java.lang.String searchText)
Finds a text node, however embedded it might be, and returns it. |
Uses of Text in org.htmlparser.visitors |
Methods in org.htmlparser.visitors with parameters of type Text | |
void |
NodeVisitor.visitStringNode(Text string)
Called for each StringNode visited. |
void |
StringFindingVisitor.visitStringNode(Text stringNode)
|
void |
TextExtractingVisitor.visitStringNode(Text stringNode)
|
void |
UrlModifyingVisitor.visitStringNode(Text stringNode)
|
|
|||||||||||
PREV NEXT | FRAMES NO FRAMES |