Markup As A Sequence

Serial markup parsing uses a markup parser that is an iterator of atomic markup items (which defaults reading from ‶standard input″):

import bj.xml.*;
for item = XmlSerialParser.parse () do
  println ("%s: %s" (name of item, item));

When serial markup parsing, start and end items (start- and end-tags for example) are separate items. For a short document the following would be the output:

bj.xml.XmlStartDocumentItem: <?xml version="1.0"?>
bj.xml.XmlStartTagItem: <doc>
bj.xml.XmlStartTagItem: <p>
bj.xml.XmlTextItem: The text.
bj.xml.XmlEndTagItem: </p>
bj.xml.XmlEndTagItem: </doc>
bj.xml.XmlEndDocumentItem: <!-- end document -->
Beyond OmniMark Sam Wilmott
Slide 22 of 37 www.wilmott.ca