Package io.xml

Class XMLParser


public final class XMLParser extends Parser<XMLElement>
A simple XML string parsing class. Accepts: - spacing at any allowed position - node, sub nodes and attributes inside nodes - self-closing nodes - comments - different encoding in ?xml header Does not accept e.g.: - namespaces - complex ?xml headers - stylesheet - DTD declaration and data - entities
Since:
08.12.2021
Author:
Juyas
See Also:
  • Constructor Details

    • XMLParser

      public XMLParser()
  • Method Details

    • transformValue

      public static String transformValue(String value, boolean isRaw)
    • parse

      public XMLElement parse(List<Token> tokens)
      Description copied from class: Parser
      Parse an object by taking a chronological list of tokens.
      Specified by:
      parse in class Parser<XMLElement>
      Parameters:
      tokens - the chronological list of tokens
      Returns:
      the parsed object