Class ASHTMLSerializer

java.lang.Object
org.apache.xml.serialize.BaseMarkupSerializer
org.apache.xml.serialize.HTMLSerializer
org.owasp.validator.html.scan.ASHTMLSerializer
All Implemented Interfaces:
org.apache.xml.serialize.DOMSerializer, org.apache.xml.serialize.Serializer, ContentHandler, DocumentHandler, DTDHandler, DeclHandler, LexicalHandler

public class ASHTMLSerializer extends org.apache.xml.serialize.HTMLSerializer
  • Field Summary

    Fields inherited from class org.apache.xml.serialize.HTMLSerializer

    XHTMLNamespace

    Fields inherited from class org.apache.xml.serialize.BaseMarkupSerializer

    _docTypePublicId, _docTypeSystemId, _encodingInfo, _format, _indenting, _prefixes, _printer, _started, fCurrentNode, fDOMError, fDOMErrorHandler, fDOMFilter, features, fStrBuffer
  • Constructor Summary

    Constructors
    Constructor
    Description
    ASHTMLSerializer(Writer w, org.apache.xml.serialize.OutputFormat format, InternalPolicy policy)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    endElementIO(String namespaceURI, String localName, String rawName)
     
    protected String
     
    protected String
    getEntityRef(int charToPrint)
     
    protected void
    Called to serialize a DOM element.

    Methods inherited from class org.apache.xml.serialize.HTMLSerializer

    characters, characters, endElement, endElement, setOutputFormat, setXHTMLNamespace, startDocument, startElement, startElement

    Methods inherited from class org.apache.xml.serialize.BaseMarkupSerializer

    asContentHandler, asDocumentHandler, asDOMSerializer, attributeDecl, checkUnboundNamespacePrefixedNode, cleanup, comment, comment, content, elementDecl, endCDATA, endDocument, endDTD, endEntity, endNonEscaping, endPrefixMapping, endPreserving, enterElementState, externalEntityDecl, fatalError, getElementState, getPrefix, ignorableWhitespace, internalEntityDecl, isDocumentState, leaveElementState, modifyDOMError, notationDecl, prepare, printCDATAText, printDoctypeURL, printEscaped, printEscaped, printText, printText, processingInstruction, processingInstructionIO, reset, serialize, serialize, serialize, serializeNode, serializePreRoot, setDocumentLocator, setOutputByteStream, setOutputCharStream, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startNonEscaping, startPrefixMapping, startPreserving, surrogates, unparsedEntityDecl

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.xml.sax.ContentHandler

    declaration
  • Constructor Details

    • ASHTMLSerializer

      public ASHTMLSerializer(Writer w, org.apache.xml.serialize.OutputFormat format, InternalPolicy policy)
  • Method Details

    • getEntityRef

      protected String getEntityRef(int charToPrint)
      Overrides:
      getEntityRef in class org.apache.xml.serialize.HTMLSerializer
    • serializeElement

      protected void serializeElement(Element elem) throws IOException
      Called to serialize a DOM element. Equivalent to calling HTMLSerializer.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes), HTMLSerializer.endElement(java.lang.String, java.lang.String, java.lang.String) and serializing everything inbetween, but better optimized.
      Overrides:
      serializeElement in class org.apache.xml.serialize.HTMLSerializer
      Throws:
      IOException
    • endElementIO

      public void endElementIO(String namespaceURI, String localName, String rawName) throws IOException
      Overrides:
      endElementIO in class org.apache.xml.serialize.HTMLSerializer
      Throws:
      IOException
    • escapeURI

      protected String escapeURI(String uri)
      Overrides:
      escapeURI in class org.apache.xml.serialize.HTMLSerializer