Interface ICDATASectionHandler

All Known Subinterfaces:
IMarkupHandler
All Known Implementing Classes:
AbstractChainedMarkupHandler, AbstractMarkupHandler, AttributeSelectionMarkingMarkupHandler, BlockSelectorMarkupHandler, DiscardMarkupHandler, DOMBuilderMarkupHandler, DuplicateMarkupHandler, HtmlMarkupHandler, MarkupEventProcessorHandler, MinimizeHtmlMarkupHandler, NodeSelectorMarkupHandler, OutputMarkupHandler, PrettyHtmlMarkupHandler, SimplifierMarkupHandler, TextOutputMarkupHandler, TraceBuilderMarkupHandler

public interface ICDATASectionHandler

Interface to be implemented by all handlers capable of receiving events about CDATA Sections.

Events in this interface are a part of the IMarkupHandler interface, the main handling interface in AttoParser.

Since:
2.0.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handleCDATASection(char[] buffer, int contentOffset, int contentLen, int outerOffset, int outerLen, int line, int col)
    Called when a CDATA section is found.
  • Method Details

    • handleCDATASection

      void handleCDATASection(char[] buffer, int contentOffset, int contentLen, int outerOffset, int outerLen, int line, int col) throws ParseException

      Called when a CDATA section is found.

      Two [offset, len] pairs are provided for two partitions (outer and content):

      <![CDATA[ this is a CDATA section ]]>
      |        [CONTENT----------------]  |
      [OUTER------------------------------]

      Artifacts are reported using the document buffer directly, and this buffer should not be considered to be immutable, so reported structures should be copied if they need to be stored (either by copying len chars from the buffer char[] starting in offset or by creating a String from it using the same specification).

      Implementations of this handler should never modify the document buffer.

      Parameters:
      buffer - the document buffer (not copied)
      contentOffset - offset for the content partition.
      contentLen - length of the content partition.
      outerOffset - offset for the outer partition.
      outerLen - length of the outer partition.
      line - the line in the original document where this artifact starts.
      col - the column in the original document where this artifact starts.
      Throws:
      ParseException - if any exceptions occur during handling.