org.attoparser.markup
Interface IDetailedElementHandling

All Superinterfaces:
IAttributeSequenceHandling
All Known Implementing Classes:
AbstractDetailedMarkupAttoHandler, AbstractStandardMarkupAttoHandler, DOMMarkupAttoHandler, DuplicatingDetailedMarkupAttoHandler, TracingDetailedMarkupAttoHandler, TracingStandardMarkupAttoHandler

public interface IDetailedElementHandling
extends IAttributeSequenceHandling

Handler feature interface to be implemented by IAttoHandler implementations that offer detailed reporting of elements (markup tags).

Since:
1.0
Author:
Daniel Fernández

Method Summary
 void handleCloseElementEnd(char[] buffer, int offset, int len, int line, int col)
           Called when the end of a close element (a close tag) is found.
 void handleCloseElementName(char[] buffer, int offset, int len, int line, int col)
           Called when the name of a close element (a close tag) is found.
 void handleCloseElementStart(char[] buffer, int offset, int len, int line, int col)
           Called when the start of a close element (a close tag) is found.
 void handleOpenElementEnd(char[] buffer, int offset, int len, int line, int col)
           Called when the end of an open element (an open tag) is found.
 void handleOpenElementName(char[] buffer, int offset, int len, int line, int col)
           Called when the name of an open element (an open tag) is found.
 void handleOpenElementStart(char[] buffer, int offset, int len, int line, int col)
           Called when the start of an open element (an open tag) is found.
 void handleStandaloneElementEnd(char[] buffer, int offset, int len, int line, int col)
           Called when the end of a standalone element (a minimized tag) is found.
 void handleStandaloneElementName(char[] buffer, int offset, int len, int line, int col)
           Called when the name of a standalone element (a minimized tag) is found.
 void handleStandaloneElementStart(char[] buffer, int offset, int len, int line, int col)
           Called when the start of a standalone element (a minimized tag) is found.
 
Methods inherited from interface org.attoparser.markup.IAttributeSequenceHandling
handleAttribute, handleAttributeSeparator
 

Method Detail

handleStandaloneElementStart

void handleStandaloneElementStart(char[] buffer,
                                  int offset,
                                  int len,
                                  int line,
                                  int col)
                                  throws AttoParseException

Called when the start of a standalone element (a minimized tag) is found. This "start" is considered to be the "<" symbol the element starts with.

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)
offset - the offset (position in buffer) where the artifact starts.
len - the length (in chars) of the artifact, starting in offset.
line - the line in the original document where this artifact starts.
col - the column in the original document where this artifact starts.
Throws:
AttoParseException

handleStandaloneElementName

void handleStandaloneElementName(char[] buffer,
                                 int offset,
                                 int len,
                                 int line,
                                 int col)
                                 throws AttoParseException

Called when the name of a standalone element (a minimized tag) is found. E.g., the "element name" of an element like <img src="images/logo.png" /> would be "img".

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)
offset - the offset (position in buffer) where the artifact starts.
len - the length (in chars) of the artifact, starting in offset.
line - the line in the original document where this artifact starts.
col - the column in the original document where this artifact starts.
Throws:
AttoParseException

handleStandaloneElementEnd

void handleStandaloneElementEnd(char[] buffer,
                                int offset,
                                int len,
                                int line,
                                int col)
                                throws AttoParseException

Called when the end of a standalone element (a minimized tag) is found. This "end" is considered to be the ">" symbol the element ends with.

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)
offset - the offset (position in buffer) where the artifact starts.
len - the length (in chars) of the artifact, starting in offset.
line - the line in the original document where this artifact starts.
col - the column in the original document where this artifact starts.
Throws:
AttoParseException

handleOpenElementStart

void handleOpenElementStart(char[] buffer,
                            int offset,
                            int len,
                            int line,
                            int col)
                            throws AttoParseException

Called when the start of an open element (an open tag) is found. This "start" is considered to be the "<" symbol the element starts with.

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)
offset - the offset (position in buffer) where the artifact starts.
len - the length (in chars) of the artifact, starting in offset.
line - the line in the original document where this artifact starts.
col - the column in the original document where this artifact starts.
Throws:
AttoParseException

handleOpenElementName

void handleOpenElementName(char[] buffer,
                           int offset,
                           int len,
                           int line,
                           int col)
                           throws AttoParseException

Called when the name of an open element (an open tag) is found. E.g., the "element name" of an element like <div class="basic"> would be "div".

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)
offset - the offset (position in buffer) where the artifact starts.
len - the length (in chars) of the artifact, starting in offset.
line - the line in the original document where this artifact starts.
col - the column in the original document where this artifact starts.
Throws:
AttoParseException

handleOpenElementEnd

void handleOpenElementEnd(char[] buffer,
                          int offset,
                          int len,
                          int line,
                          int col)
                          throws AttoParseException

Called when the end of an open element (an open tag) is found. This "end" is considered to be the ">" symbol the element ends with.

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)
offset - the offset (position in buffer) where the artifact starts.
len - the length (in chars) of the artifact, starting in offset.
line - the line in the original document where this artifact starts.
col - the column in the original document where this artifact starts.
Throws:
AttoParseException

handleCloseElementStart

void handleCloseElementStart(char[] buffer,
                             int offset,
                             int len,
                             int line,
                             int col)
                             throws AttoParseException

Called when the start of a close element (a close tag) is found. This "start" is considered to be the "<" symbol the element starts with.

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)
offset - the offset (position in buffer) where the artifact starts.
len - the length (in chars) of the artifact, starting in offset.
line - the line in the original document where this artifact starts.
col - the column in the original document where this artifact starts.
Throws:
AttoParseException

handleCloseElementName

void handleCloseElementName(char[] buffer,
                            int offset,
                            int len,
                            int line,
                            int col)
                            throws AttoParseException

Called when the name of a close element (a close tag) is found. E.g., the "element name" of an element like </div> would be "div".

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)
offset - the offset (position in buffer) where the artifact starts.
len - the length (in chars) of the artifact, starting in offset.
line - the line in the original document where this artifact starts.
col - the column in the original document where this artifact starts.
Throws:
AttoParseException

handleCloseElementEnd

void handleCloseElementEnd(char[] buffer,
                           int offset,
                           int len,
                           int line,
                           int col)
                           throws AttoParseException

Called when the end of a close element (a close tag) is found. This "end" is considered to be the ">" symbol the element ends with.

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)
offset - the offset (position in buffer) where the artifact starts.
len - the length (in chars) of the artifact, starting in offset.
line - the line in the original document where this artifact starts.
col - the column in the original document where this artifact starts.
Throws:
AttoParseException


Copyright © 2012 The ATTOPARSER team. All Rights Reserved.