Class DocumentHandlerToSAXAdapter

  • All Implemented Interfaces:
    DocumentHandler

    @Deprecated
    public class DocumentHandlerToSAXAdapter
    extends 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.
    • Constructor Detail

      • DocumentHandlerToSAXAdapter

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

      • onStartElement

        public void onStartElement​(String tagName,
                                   AttributeList attributes,
                                   char[] buffer,
                                   int offset,
                                   int length,
                                   boolean endSlash)
                            throws 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:
        IOException - IOException
      • onEndElement

        public void onEndElement​(String tagName,
                                 char[] buffer,
                                 int offset,
                                 int length)
                          throws 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:
        IOException - IOException