Class WikiTextParser

java.lang.Object
com.lucaskjaerozhang.wikitext_parser.WikiTextParser

public class WikiTextParser extends Object
The main class consumers of this library should use.
  • Constructor Details

    • WikiTextParser

      public WikiTextParser()
  • Method Details

    • parse

      public static WikiTextElement parse(String inputText)
      Generate the AST of a string input.
      Parameters:
      inputText - The input to parse.
      Returns:
      The AST generated from the input.
    • writeToString

      public static String writeToString(WikiTextNode root)
      Writes an AST to an xml string.
      Parameters:
      root - The AST.
      Returns:
      The AST as a string.
    • parseToString

      public static String parseToString(String inputText)
      Parses the wikitext to XML.
      Parameters:
      inputText - The test to parse.
      Returns:
      XML representing the input.