Package com.day.cq.rewriter.htmlparser
Class DocumentHandlerToSAXAdapter
- java.lang.Object
-
- com.day.cq.rewriter.htmlparser.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.
-
-
-
Field Detail
-
NAMESPACE
public static final java.lang.String NAMESPACE
Deprecated.- See Also:
- Constant Field Values
-
END_SLASH_ATTR
public static final java.lang.String END_SLASH_ATTR
Deprecated.- See Also:
- Constant Field Values
-
QUOTES_ATTR
public static final java.lang.String QUOTES_ATTR
Deprecated.- See Also:
- Constant Field Values
-
-
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 interfaceDocumentHandler
- Parameters:
buffer
- Character dataoffset
- Offset where character data startslength
- 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 interfaceDocumentHandler
- Parameters:
tagName
- Tag nameattributes
- List of attributesbuffer
- Contains the whole tag including attributesoffset
- Offset where the character data startslength
- Length of the character dataendSlash
- 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 interfaceDocumentHandler
- Parameters:
tagName
- Tag namebuffer
- Contains the whole tag including attributesoffset
- Offset where the character data startslength
- Length of the character data- Throws:
java.io.IOException
-IOException
-
onEnd
public void onEnd() throws java.io.IOException
Deprecated.Description copied from interface:DocumentHandler
Receive notification of parsing end.- Specified by:
onEnd
in interfaceDocumentHandler
- Throws:
java.io.IOException
-IOException
- See Also:
DocumentHandler.onEnd()
-
onStart
public void onStart() throws java.io.IOException
Deprecated.Description copied from interface:DocumentHandler
Receive notification of parsing start.- Specified by:
onStart
in interfaceDocumentHandler
- Throws:
java.io.IOException
-IOException
- See Also:
DocumentHandler.onStart()
-
-