org.attoparser.markup
Class MarkupAttoParser

Object
  extended by org.attoparser.AbstractAttoParser
      extended by org.attoparser.AbstractBufferedAttoParser
          extended by org.attoparser.markup.MarkupAttoParser
All Implemented Interfaces:
IAttoParser

public final class MarkupAttoParser
extends AbstractBufferedAttoParser

Default implementation of the IAttoParser interface, able of parsing XML and HTML markup.

This parser reports as structures:

This parser class is thread-safe. But take into account that, usually, the IAttoHandler implementations passed to parsers for event handling are not.

Since:
1.0
Author:
Daniel Fernández

Nested Class Summary
 
Nested classes/interfaces inherited from class org.attoparser.AbstractBufferedAttoParser
AbstractBufferedAttoParser.BufferParseResult
 
Field Summary
 
Fields inherited from class org.attoparser.AbstractBufferedAttoParser
BUFFER_SIZE
 
Constructor Summary
MarkupAttoParser()
           Creates a new instance of this parser.
 
Method Summary
protected  AbstractBufferedAttoParser.BufferParseResult parseBuffer(char[] buffer, int offset, int len, IAttoHandler handler, int line, int col)
           Parse a buffer segment and return a AbstractBufferedAttoParser.BufferParseResult reporting the results of this parsing.
 
Methods inherited from class org.attoparser.AbstractBufferedAttoParser
parseDocument
 
Methods inherited from class org.attoparser.AbstractAttoParser
parse, parse, parse, parse
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkupAttoParser

public MarkupAttoParser()

Creates a new instance of this parser.

Method Detail

parseBuffer

protected final AbstractBufferedAttoParser.BufferParseResult parseBuffer(char[] buffer,
                                                                         int offset,
                                                                         int len,
                                                                         IAttoHandler handler,
                                                                         int line,
                                                                         int col)
                                                                  throws AttoParseException
Description copied from class: AbstractBufferedAttoParser

Parse a buffer segment and return a AbstractBufferedAttoParser.BufferParseResult reporting the results of this parsing.

Specified by:
parseBuffer in class AbstractBufferedAttoParser
Parameters:
buffer - the document buffer.
offset - the offset (in the document buffer) of the segment to be parsed.
len - the length (in chars) of the segment to be parsed.
handler - the IAttoHandler implementation to be used for reporting events.
line - the line of the first position (offset) in buffer.
col - the column of the first position (offset) in buffer.
Returns:
a AbstractBufferedAttoParser.BufferParseResult reporting the parsing status.
Throws:
AttoParseException - if an error occurs.


Copyright © 2012 The ATTOPARSER team. All Rights Reserved.