hmi.xml
Class XMLTokenizer

java.lang.Object
  extended by hmi.xml.XMLTokenizer

public class XMLTokenizer
extends Object

A scanner of XML input streams.

An XML scanner enforces only the simple lexical well-formedness constraints of XML 1.0. An XML stream is a sequence of lexical tokens. These lexical tokens have an external (string) representation, and an internal representation. The recognized lexical tokens, and their external representations are:

identifiers consist exclusively of the following characters: a-zA-Z0-9-_.: and must start with one of the characters a-zA-Z_

A start tag immediately followed by the corresponding end tag can be represented externally as an "empty tag" of the form:

CHARDATA, or "content" is considered to be "parsed character data", which means the following:

Such entity references are translated to their internal representation: < > & " ' 3) The XML standard assumes also that the character sequence ]]> does not occur in character data. Note that the characters > " ' are not forbidden in character data. However, the easiest way to translate arbitrary character strings into legal XML character data is to do the following:

The regular expression that describes the possible streams of lexical tokens is: ( (Stag (AttrName AttrValue)*) | ETAG | CHARDATA | PI | DECL )* EndOfData

The scanner can work with two different interfaces: