All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----uhr.core.tron.SimpleParserXML
1. Duplicate tags are permitted directly within an element.A very small parser such as this one has the advantage of allowing the core to be parameter driven in an embedded environment. We expect to eventually use a third party parser as needs arise, the industry/technology settles down, and they become more appropriate for our needs.2. Only basic tags, comments and "<?" are supported. A basic tag is of the format <TagName>data or elements</TagName>. Empty tags like <TagName/@gt; are not supported. Attributes are not sopported. Entities are not yet implemented.
3. Cannot mix character data and elements within an element. After all, an Infotron node can only be a value (data) or a container (element with children).
4. Empty elements are provided with a null value, not an empty String.
5. All lines are trimmed and then one space is added at the end to separate possible words. If you want to delimit lines of character data, we suggest a semi-colon at the end.
6. Nested comments are not supported.
The unit test is: java -nojit uhr.core.test.SimpleParserXML_Test1
parseInto(String, Flexitron) except it creates
a new InfotronStd() to be used as the Flexitron, and returns it.
public SimpleParserXML()
public void parseInto(String text,
Flexitron tron)
The provided Flexitron allows the client to parse directly into the Flexitron configuration and implementation preferred. For example if Param extends FlexitronStd and FlexitronStd implements Flexitron, a Param can be the tron argument.
Note the provided flexitron must have a configuration compatible with the provided text.
public Flexitron parseText(String text)
parseInto(String, Flexitron) except it creates
a new InfotronStd() to be used as the Flexitron, and returns it.
All Packages Class Hierarchy This Package Previous Next Index