@Role
public interface Parser
Blocks).| Modifier and Type | Method and Description |
|---|---|
Syntax |
getSyntax() |
XDOM |
parse(Reader source) |
default XDOM |
parse(Reader source,
IdGenerator idGenerator) |
Syntax getSyntax()
XDOM parse(Reader source) throws ParseException
source - the content to parseBlocksParseException - 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 XDOM parse(Reader source, IdGenerator idGenerator) throws ParseException
source - the content to parseidGenerator - the id generator to use for automatically generating ids during parsingBlocksParseException - 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.