All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class uhr.core.tron.SimpleParserXML

java.lang.Object
   |
   +----uhr.core.tron.SimpleParserXML

public class SimpleParserXML
extends Object
This class parses XML into a data structure. Only the very simplest aspects of XML are supported. Features are:
1. Duplicate tags are permitted directly within an element.

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.

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.

The unit test is: java -nojit uhr.core.test.SimpleParserXML_Test1


Constructor Index

 o SimpleParserXML()

Method Index

 o parse(String)
Parses the text into an Infotron.

Constructors

 o SimpleParserXML
 public SimpleParserXML()

Methods

 o parse
 public Infotron parse(String text)
Parses the text into an Infotron. See class documentation.


All Packages  Class Hierarchy  This Package  Previous  Next  Index