public final class CmsHtmlTagRemoveFactory
extends org.htmlparser.PrototypicalNodeFactory
implements java.io.Serializable
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.
| Constructor and Description |
|---|
CmsHtmlTagRemoveFactory()
Create a new factory with all tags registered.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addTagRemoval(org.htmlparser.Tag tag)
Add a tag that will be invisible for
NodeVisitor instances. |
org.htmlparser.Tag |
createTagNode(org.htmlparser.lexer.Page arg0,
int arg1,
int arg2,
java.util.Vector arg3) |
clear, createRemarkNode, createStringNode, createTagNode, get, getRemarkPrototype, getTagNames, getTagPrototype, getTextPrototype, put, registerTag, registerTags, remove, setRemarkPrototype, setTagPrototype, setTextPrototype, unregisterTagpublic CmsHtmlTagRemoveFactory()
public boolean addTagRemoval(org.htmlparser.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 org.htmlparser.Tag createTagNode(org.htmlparser.lexer.Page arg0,
int arg1,
int arg2,
java.util.Vector arg3)
org.htmlparser.PrototypicalNodeFactory#createTagNode(org.htmlparser.lexer.Page, int,
int, java.util.Vector)