Class ASXHTMLSerializer

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

public class ASXHTMLSerializer extends org.apache.xml.serialize.XHTMLSerializer
This is an extension of the default XHTMLSerializer class that's had it's endElementIO() method tweaked to serialize closing tags and self-closing tags the way we require.
  • 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
    ASXHTMLSerializer(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
    getEntityRef(int charToPrint)
     

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

    setOutputFormat

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

    characters, characters, endElement, endElement, escapeURI, serializeElement, 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

    • ASXHTMLSerializer

      public ASXHTMLSerializer(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
    • endElementIO

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