Package org.xwiki.rendering.parser
Interface ContentParser
-
@Role public interface ContentParser
A bridge between platform and rendering for centralizing parsing needs.- Since:
- 6.0M2
- Version:
- $Id: 8c75b688091b702e33a9f84f16eca4d6a7fdaeef $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.xwiki.rendering.block.XDOM
parse(String content, org.xwiki.rendering.syntax.Syntax syntax)
Parse content.org.xwiki.rendering.block.XDOM
parse(String content, org.xwiki.rendering.syntax.Syntax syntax, EntityReference source)
Parse content, and add source metadata.
-
-
-
Method Detail
-
parse
org.xwiki.rendering.block.XDOM parse(String content, org.xwiki.rendering.syntax.Syntax syntax) throws org.xwiki.rendering.parser.ParseException, MissingParserException
Parse content.- Parameters:
content
- the content to parse.syntax
- the syntax in which the content is written.- Returns:
- the XDOM corresponding to the parsed content.
- Throws:
org.xwiki.rendering.parser.ParseException
- when a parsing error occurs.MissingParserException
- when no parser has been found.
-
parse
org.xwiki.rendering.block.XDOM parse(String content, org.xwiki.rendering.syntax.Syntax syntax, EntityReference source) throws org.xwiki.rendering.parser.ParseException, MissingParserException
Parse content, and add source metadata.- Parameters:
content
- the content to parse.syntax
- the syntax in which the content is written.source
- the source entity (mostly a Document Reference) containing the parsed content.- Returns:
- the XDOM corresponding to the parsed content with source metadata set to source.
- Throws:
org.xwiki.rendering.parser.ParseException
- when a parsing error occurs.MissingParserException
- when no parser has been found.
-
-