Class TraversalDomSerializer

java.lang.Object
org.htmlcleaner.TraversalDomSerializer

public class TraversalDomSerializer extends Object
A traversal-based serializer for DOM; used to avoid recursion and stack overflow for large HTML documents.
  • Field Details

    • escapeXml

      protected boolean escapeXml
      Whether XML entities should be escaped or not.
    • deserializeCdataEntities

      protected boolean deserializeCdataEntities
    • strictErrorChecking

      protected boolean strictErrorChecking
  • Constructor Details

    • TraversalDomSerializer

      public TraversalDomSerializer(CleanerProperties props, boolean escapeXml, boolean deserializeCdataEntities, boolean strictErrorChecking)
      Parameters:
      props - the HTML Cleaner properties set by the user to control the HTML cleaning.
      escapeXml - if true then escape XML entities
      deserializeCdataEntities - if true then deserialize entities in CData sections
      strictErrorChecking - if false then Document strict error checking is turned off
    • TraversalDomSerializer

      public TraversalDomSerializer(CleanerProperties props, boolean escapeXml, boolean deserializeCdataEntities)
      Parameters:
      props - the HTML Cleaner properties set by the user to control the HTML cleaning.
      escapeXml - if true then escape XML entities
      deserializeCdataEntities - if true then deserialize entities in CData sections
    • TraversalDomSerializer

      public TraversalDomSerializer(CleanerProperties props, boolean escapeXml)
      Parameters:
      props - the HTML Cleaner properties set by the user to control the HTML cleaning.
      escapeXml - if true then escape XML entities
    • TraversalDomSerializer

      public TraversalDomSerializer(CleanerProperties props)
      Parameters:
      props - the HTML Cleaner properties set by the user to control the HTML cleaning.
  • Method Details