Package org.htmlcleaner
Class DomBuilder
java.lang.Object
org.htmlcleaner.DomBuilder
- All Implemented Interfaces:
XmlVisitor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
protected boolean
private Element
private Document
protected boolean
private CleanerProperties
protected boolean
-
Constructor Summary
ConstructorsConstructorDescriptionDomBuilder
(CleanerProperties props, boolean escapeXml, boolean deserializeCdataEntities, boolean strictErrorChecking) -
Method Summary
Modifier and TypeMethodDescriptionprotected Document
createDocument
(TagNode rootNode) protected String
deserializeCdataEntities
(String input) void
Callback for when a node is first visited.private boolean
void
Callback for when a node is last visited, after all of its descendants have been visited.
-
Field Details
-
document
-
destinationElement
-
props
-
escapeXml
protected boolean escapeXml -
deserializeCdataEntities
protected boolean deserializeCdataEntities -
strictErrorChecking
protected boolean strictErrorChecking -
CSS_COMMENT_START
- See Also:
-
-
Constructor Details
-
DomBuilder
public DomBuilder(CleanerProperties props, boolean escapeXml, boolean deserializeCdataEntities, boolean strictErrorChecking)
-
-
Method Details
-
getDocument
-
shouldEscapeOrTranslateEntities
private boolean shouldEscapeOrTranslateEntities() -
head
Description copied from interface:XmlVisitor
Callback for when a node is first visited.- Specified by:
head
in interfaceXmlVisitor
- Parameters:
node
- the node being visited.depth
- the depth of the node, relative to the root node. E.g., the root node has depth 0, and a child node of that will have depth 1.
-
deserializeCdataEntities
-
tail
Description copied from interface:XmlVisitor
Callback for when a node is last visited, after all of its descendants have been visited.- Specified by:
tail
in interfaceXmlVisitor
- Parameters:
node
- the node being visited.depth
- the depth of the node, relative to the root node. E.g., the root node has depth 0, and a child node of that will have depth 1.
-
createDocument
- Throws:
ParserConfigurationException
-