Siemens SINUMERIK 808D ADVANCED Commissioning Manual page 321

Hide thumbs Also See for SINUMERIK 808D ADVANCED:
Table of Contents

Advertisement

Tag identifier
XML_PARSER
Commissioning Manual
01/2017
Meaning
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.
Predefined events:
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.
Interfaces
The value of the name attribute contains the path to the XML file.
To assign events to the call-back functions, the following properties must be specified:
Standard
startElementHandler
endElementHandler
charactersHandler
Optional
errorHandler
documentHandler
The value of an attribute defines the name of the call-back function.
Example:
<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" />
</XML_PARSER>
321

Advertisement

Table of Contents
loading

Table of Contents