|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.htmlparser.PrototypicalNodeFactory
org.opencms.util.CmsHtmlTagRemoveFactory
public final class CmsHtmlTagRemoveFactory
A tag factory for htmlparser that is able to "remove tags".
Create an instance, add the Tag instances to remove and assign this
factory to the Parser before starting a visit. A demo usage is shown in
org.opencms.workplace.tools.content.CmsTagReplaceParser.
The tags are not actually removed: They are linked in the document object model tree of the HTML
that the parser generates. They just will not accept any NodeVisitor instances and
therefore be invisible in any output a visitor will generate from the visited tree.
| Field Summary |
|---|
| Fields inherited from class org.htmlparser.PrototypicalNodeFactory |
|---|
mBlastocyst, mRemark, mTag, mText |
| Constructor Summary | |
|---|---|
CmsHtmlTagRemoveFactory()
Create a new factory with all tags registered. |
|
| Method Summary | |
|---|---|
boolean |
addTagRemoval(Tag tag)
Add a tag that will be invisible for NodeVisitor instances. |
Tag |
createTagNode(Page arg0,
int arg1,
int arg2,
Vector arg3)
|
| Methods inherited from class org.htmlparser.PrototypicalNodeFactory |
|---|
clear, createRemarkNode, createStringNode, get, getRemarkPrototype, getTagNames, getTagPrototype, getTextPrototype, put, registerTag, registerTags, remove, setRemarkPrototype, setTagPrototype, setTextPrototype, unregisterTag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CmsHtmlTagRemoveFactory()
| Method Detail |
|---|
public boolean addTagRemoval(Tag tag)
NodeVisitor instances.
Not only "this" tag will be invisible but all parsed Tags that have the same name (case insensitive).
tag - the tag that will be invisible for all NodeVisitor instances.
public Tag createTagNode(Page arg0,
int arg1,
int arg2,
Vector arg3)
createTagNode in interface NodeFactorycreateTagNode in class PrototypicalNodeFactoryPrototypicalNodeFactory.createTagNode(org.htmlparser.lexer.Page, int,
int, java.util.Vector)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||