org.htmlcleaner
Class DomSerializer

java.lang.Object
  extended by org.htmlcleaner.DomSerializer

public class DomSerializer
extends Object

DOM serializer - creates xml DOM.


Field Summary
protected  boolean escapeXml
           
protected  CleanerProperties props
           
 
Constructor Summary
DomSerializer(CleanerProperties props)
           
DomSerializer(CleanerProperties props, boolean escapeXml)
           
 
Method Summary
 Document createDOM(TagNode rootNode)
           
protected  boolean dontEscape(Element element)
          encapsulate content with <[CDATA[ ]]> for things like script and style elements
protected  boolean isScriptOrStyle(Element element)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

protected CleanerProperties props

escapeXml

protected boolean escapeXml
Constructor Detail

DomSerializer

public DomSerializer(CleanerProperties props,
                     boolean escapeXml)

DomSerializer

public DomSerializer(CleanerProperties props)
Method Detail

createDOM

public Document createDOM(TagNode rootNode)
                   throws ParserConfigurationException
Throws:
ParserConfigurationException

isScriptOrStyle

protected boolean isScriptOrStyle(Element element)

dontEscape

protected boolean dontEscape(Element element)
encapsulate content with <[CDATA[ ]]> for things like script and style elements

Parameters:
element -
Returns:
true if <[CDATA[ ]]> should be used.


Copyright © 2006-2013. All Rights Reserved.