Kinesis SoftwareKineticFusion

[Show Table of Contents]

10 RVML Reference

[Hide Table of Contents]

10.6.1 XML Processing Architecture

RVML is processed by KineticFusion using an XML parser technology called SAX (Simple API for XML). In a standard SAX architecture, a system XMLParser reads in the XML document and, as it reads the document, generates SAX events that are handled by a ContentHandler object supplied by the application. When processing RVML, the following SAX events need to be handled in an RVML-specific way:

Start Element event
This event is generated when an XML start tag is encountered on input. The information in the event provides the namespace, element name and defined attributes. There is always just one namespace and element name but there can be zero or more attributes associate with a start tag.
End Element event
This event is generated which an XML end tag is encountered on input.
Characters Event
This event is generated when characters are detected between tags, including all whitespace characters.

For example, the following illustrates a tiny RVML document and the SAX events that are received by the ContentHandler from the SAXParser:

<Movie version='7' width='600' height='550' 
    <Timeline frameCount='1'>

Generates the following SAX events:

        startElement(, Movie, [width, height])
        startElement(, Timeline, []) 
            startElement(, EmptyFrame, [])
            endElement(, EmptyFrame)
        endElement(, Timeline)
    endElement(, Movie)

The KineticFusion ContentHandler is a special KineticFusion Java class that delegates all RVML processing to a hierarchy of specialised element processors.