Package io.xml

Class XMLTokenizer

java.lang.Object
io.Tokenizer
io.xml.XMLTokenizer

public final class XMLTokenizer extends Tokenizer
Since:
11.12.2021
Author:
Juyas
See Also:
  • Field Details

    • OPEN_TAG

      public static final TokenReader OPEN_TAG
    • CLOSE_TAG

      public static final TokenReader CLOSE_TAG
    • SELF_CLOSE

      public static final TokenReader SELF_CLOSE
    • ATTR_EQUALS

      public static final TokenReader ATTR_EQUALS
    • SPACING

      public static final TokenReader SPACING
    • VALUE

      public static final TokenReader VALUE
    • QUOTATION

      public static final TokenReader QUOTATION
    • COMMENT_MARK

      public static final TokenReader COMMENT_MARK
    • COMMENT_CONTENT

      public static final TokenReader COMMENT_CONTENT
    • COMMENT_DASHES

      public static final TokenReader COMMENT_DASHES
    • IDENTIFIER

      public static final TokenReader IDENTIFIER
  • Constructor Details

    • XMLTokenizer

      public XMLTokenizer()
  • Method Details

    • tokenize

      public List<Token> tokenize(String input)
      Description copied from class: Tokenizer
      Reads an input string and extracts all tokens depending on the implementation from it
      Specified by:
      tokenize in class Tokenizer
      Parameters:
      input - the input string data
      Returns:
      a list of all tokens while retaining its chronological order.
    • detectCharset

      public Charset detectCharset(byte[] input)
      Description copied from class: Tokenizer
      Read raw input data to determine the charset based on the input - or return a default one.
      Specified by:
      detectCharset in class Tokenizer
      Parameters:
      input - the raw input byte
      Returns:
      the charset somewhere defined in the input data or a default charset