@Role
public interface StreamParser
| Modifier and Type | Method and Description |
|---|---|
Syntax |
getSyntax() |
void |
parse(Reader source,
Listener listener) |
default void |
parse(Reader source,
Listener listener,
IdGenerator idGenerator) |
Syntax getSyntax()
void parse(Reader source, Listener listener) throws ParseException
source - the content to parselistener - receive event for each elementParseException - if the source cannot be read or an unexpected error happens during the parsing. Parsers
should be written to not generate any error as much as possible.@Unstable default void parse(Reader source, Listener listener, IdGenerator idGenerator) throws ParseException
source - the content to parselistener - the listener that receives an event for each elementidGenerator - the id generator to use for automatically generating ids during parsingParseException - if the source cannot be read or an unexpected error happens during the parsing.
Parsers should be written to not generate any error as much as possible.Copyright © 2004–2022 XWiki. All rights reserved.