Commissioning Manual
01/2017
321
The “XML_PARSER” tag can be used to parse XML files.
The parser interprets an XML file and calls defined call-back functions. Each call-back
function belongs to a predefined event. The programmer can process the XML data within
this function.
• start document
The parser opens the document and starts parsing.
• end document
The parser closes the document.
• start element
The parser has found an element and creates a list with all attributes and attribute val-
ues.
These lists are forwarded to the call-back function.
• end element
The end of the element has been found.
• characters
The parser forwards all characters of an element.
• error
The parser has detected a syntax error.
When an event occurs, the parser calls the call-back function and checks the function
return value. If the function returns "true," the parser continues the process.
The value of the
attribute contains the path to the XML file.
To assign events to the call-back functions, the following properties must be specified:
startElementHandler
endElementHandler
charactersHandler
errorHandler
documentHandler
The value of an attribute defines the name of the call-back function.
<XML_PARSER name="f:\appl\xml_test.xml">
<!-- standard handler -->
<property startElementHandler="startElementHandler" />
<property endElementHandler="endElementHandler" />
<property charactersHandler="charactersHandler" />
<!-- optional handler -->
<property errorHandler="errorHandler" />
<property documentHandler="documentHandler" />