XMLWrite (FB)¶
FUNCTION_BLOCK XMLWrite
Writes a xml file. Use the function block XMLWriteAsync for large XML files to write the values asynchronously. To write to file set sFileName to file path and paDataArray = 0. To write to data array set sFileName = ‚‘ and paDataArray to data pointer.
- InOut:
Scope
Name
Type
Initial
Comment
Input
sFileNameSTRING(255)Path to a file
paElementsPOINTER TO XMLElement
Pointer to the result set
udiCountElementsUDINTNumber elements in paElements
eEncodingFile encoding
paDataArrayPOINTER TO BYTE
0
Pointer to XML data array, if 0 write to file (sFileName)
udiDataArraySizeUDINT0
Size of paDataArray
xAddDeclarationBOOLTRUE
Adds XML declaration with encoding info like ‚<?xml version=“1.0“ encoding=..‘, default: TRUE
Output
eErrorError