|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES | ||||||||||
| Packages that use PrototypicalNodeFactory | |
| org.htmlparser | The basic API classes which will be used by most developers when working with the HTML Parser. |
| Uses of PrototypicalNodeFactory in org.htmlparser |
| Subclasses of PrototypicalNodeFactory in org.htmlparser | |
class |
StringNodeFactory
Deprecated. Use PrototypicalNodeFactory#setTextPrototype(Text) A more efficient implementation of affecting all string nodes, is to replace
the Text node prototype in the For example, if you were using: StringNodeFactory factory = new StringNodeFactory(); factory.setDecode(true);to decode all text issued from Text.toPlainTextString(),
you would instead create a subclass of TextNode
and set it as the prototype for text node generation:
PrototypicalNodeFactory factory = new PrototypicalNodeFactory ();
factory.setTextPrototype (new TextNode () {
public String toPlainTextString()
{
return (org.htmlparser.util.Translate.decode (super.toPlainTextString ()));
}
});
Similar constructs apply to removing escapes and converting non-breaking
spaces, which were the examples previously provided.
Using a subclass avoids the wrapping and delegation inherent in the decorator pattern, with subsequent improvements in processing speed and memory usage. |
| Methods in org.htmlparser that return PrototypicalNodeFactory | |
PrototypicalNodeFactory |
PrototypicalNodeFactory.registerTags()
Register all known tags in the tag package. |
|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES | ||||||||||