ns=2;s=DEPRAG Smart/Local/FileAndDirectoryAccess/Xml/OpenXmlDocument
The command opens an XML file for further processing. The reader can be retrieved from the "ActiveXMLDocuments" list via the returned index.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bXmlOpenXmlDocument : BOOL;
OutputDataXmlOpenXmlDocument : ST_XmlDocumentOutputData;
hrXmlOpenXmlDocument : HRESULT;
fbXml : FB_Xml;
END_VAR
hrXmlOpenXmlDocument := fbXml.OpenXmlDocument(
bExecute := bXmlOpenXmlDocument,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sfullFilePath := 'C:\Test\Test.xml',
OutputData => OutputDataXmlOpenXmlDocument);
IF hrXmlOpenXmlDocument <> S_FALSE THEN
bXmlOpenXmlDocument := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".