Class DocumentHandlerToSAXAdapter

  • All Implemented Interfaces:
    DocumentHandler

    @Deprecated
    public class DocumentHandlerToSAXAdapter
    extends java.lang.Object
    implements DocumentHandler
    Deprecated.
    This is replaced by the Apache Sling Html parsing.
    This is an adapter from the document handler events to SAX events.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String END_SLASH_ATTR
      Deprecated.
       
      static java.lang.String NAMESPACE
      Deprecated.
       
      static java.lang.String QUOTES_ATTR
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      DocumentHandlerToSAXAdapter​(org.xml.sax.ContentHandler handler)
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void characters​(char[] buffer, int offset, int length)
      Deprecated.
      Called by HtmlParser if character data and tags are to be output for which no special handling is necessary.
      void onEnd()
      Deprecated.
      Receive notification of parsing end.
      void onEndElement​(java.lang.String tagName, char[] buffer, int offset, int length)
      Deprecated.
      Called by HtmlParser for the end element of a tag that requires special handling.
      void onStart()
      Deprecated.
      Receive notification of parsing start.
      void onStartElement​(java.lang.String tagName, AttributeList attributes, char[] buffer, int offset, int length, boolean endSlash)
      Deprecated.
      Called by HtmlParser for the start element of a tag that requires special handling.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DocumentHandlerToSAXAdapter

        public DocumentHandlerToSAXAdapter​(org.xml.sax.ContentHandler handler)
        Deprecated.
    • Method Detail

      • characters

        public void characters​(char[] buffer,
                               int offset,
                               int length)
                        throws java.io.IOException
        Deprecated.
        Called by HtmlParser if character data and tags are to be output for which no special handling is necessary.
        Specified by:
        characters in interface DocumentHandler
        Parameters:
        buffer - Character data
        offset - Offset where character data starts
        length - The length of the character data
        Throws:
        java.io.IOException - IOException
        See Also:
        DocumentHandler.characters(char[], int, int)
      • onStartElement

        public void onStartElement​(java.lang.String tagName,
                                   AttributeList attributes,
                                   char[] buffer,
                                   int offset,
                                   int length,
                                   boolean endSlash)
                            throws java.io.IOException
        Deprecated.
        Called by HtmlParser for the start element of a tag that requires special handling. Remembers base reference and removes invalid links.
        Specified by:
        onStartElement in interface DocumentHandler
        Parameters:
        tagName - Tag name
        attributes - List of attributes
        buffer - Contains the whole tag including attributes
        offset - Offset where the character data starts
        length - Length of the character data
        endSlash - Flag indicating whether the element is closed with an ending slash (xhtml-compliant)
        Throws:
        java.io.IOException - IOException
      • onEndElement

        public void onEndElement​(java.lang.String tagName,
                                 char[] buffer,
                                 int offset,
                                 int length)
                          throws java.io.IOException
        Deprecated.
        Called by HtmlParser for the end element of a tag that requires special handling. Removes end element if corresponding start element (link) has already been removed.
        Specified by:
        onEndElement in interface DocumentHandler
        Parameters:
        tagName - Tag name
        buffer - Contains the whole tag including attributes
        offset - Offset where the character data starts
        length - Length of the character data
        Throws:
        java.io.IOException - IOException