Package io.xml
Class XMLParser
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionParse an object by taking a chronological list of tokens.static String
transformValue
(String value, boolean isRaw)
-
Constructor Details
-
XMLParser
public XMLParser()
-
-
Method Details
-
transformValue
-
parse
Description copied from class:Parser
Parse an object by taking a chronological list of tokens.- Specified by:
parse
in classParser<XMLElement>
- Parameters:
tokens
- the chronological list of tokens- Returns:
- the parsed object
-