Package org.xwiki.rendering.parser
Interface Parser
-
@Role public interface Parser
Parse content into a XDOM (a tree ofBlock
s).- Since:
- 1.5M2
- Version:
- $Id: 235687e107afcb5a6926bf3c857faa7070941b70 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Syntax
getSyntax()
XDOM
parse(Reader source)
default XDOM
parse(Reader source, IdGenerator idGenerator)
-
-
-
Method Detail
-
getSyntax
Syntax getSyntax()
- Returns:
- the syntax the parser is implementing
-
parse
XDOM parse(Reader source) throws ParseException
- Parameters:
source
- the content to parse- Returns:
- the tree representation of the content as
Block
s - Throws:
ParseException
- 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.
-
parse
@Unstable default XDOM parse(Reader source, IdGenerator idGenerator) throws ParseException
- Parameters:
source
- the content to parseidGenerator
- the id generator to use for automatically generating ids during parsing- Returns:
- the tree representation of the content as
Block
s - Throws:
ParseException
- 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.- Since:
- 14.2RC1
-
-