Class WikiTextParser
java.lang.Object
com.lucaskjaerozhang.wikitext_parser.WikiTextParser
The main class consumers of this library should use.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WikiTextElement
Generate the AST of a string input.static String
parseToString
(String inputText) Parses the wikitext to XML.static String
writeToString
(WikiTextNode root) Writes an AST to an xml string.
-
Constructor Details
-
WikiTextParser
public WikiTextParser()
-
-
Method Details
-
parse
Generate the AST of a string input.- Parameters:
inputText
- The input to parse.- Returns:
- The AST generated from the input.
-
writeToString
Writes an AST to an xml string.- Parameters:
root
- The AST.- Returns:
- The AST as a string.
-
parseToString
Parses the wikitext to XML.- Parameters:
inputText
- The test to parse.- Returns:
- XML representing the input.
-