XML documents can be managed from the IEC application as a tree of XML tags.

Each XML tag is represented by:

  • a tag name,
  • a list of attributes (name=value),
  • a contents (raw text),
  • a list of child tags.

A complete XML document is handled as its main tag.

XML functions are originally designed for working with text buffers. However, some additional functions have been added for dealing with XML files on disk as it may be helpful in other applications.

attentionAttention

XML parsing and writing functions support only 8 bit encoding features. This can be UTF8 or ANSI (ISO-8859-1) encoding. Some text buffers handling functions provide conversion between UTF8 and ANSI formats.

There must be one instance of the XmlManager declared in your application for using these functions.

There must be one instance of the TxbManager declared in your application for using text buffers related functions.

Memory management / Miscellaneous

XmlManager: Main gatherer of XML data in memory.

XmlLastError: Get detailed error report about last call.

Reading/writing documents

XmlNewDoc: Create an empty XML document.

XmlFreeDoc: Release a XML document from memory.

XmlParseDocTxb: Parse a XML document from text buffer.

XmlParseDocFile: Parse a XML document form file.

XmlWriteDocTxb: Format XML data to text buffer.

XmlWriteDocFile: Format XML data to file.

Exploring a XML document

XmlGetTagName: Get name of a XML tag.

XmlCheckTagName: Test the name of a XML tag.

XmlGetTagCont: Get tag contents as STRING.

XmlGetTagContT: Get tag contents as text buffer.

XmlGetTagAttrib: Get tag attribute.

XmlGetParent: Get parent tag.

XmlFirstChild: Start enumerating child tags.

XmlNextChild: Enumerate child tags

Building a XML document

XmlSetTagAttrib: Set tag attribute.

XmlSetTagCont: Set tag contents with STRING.

XmlSetTagContT: Set tag contents with text buffer.

XmlAddChild: Add a child tag.

Exchanging variables using their name

XmlGetSybValue: Get variable value using its symbol.

XmlSetSybValue: Set variable value using its symbol.

XML writing and parsing

IEC 61131-3 Automation platform > Programming - Reference guide > Advanced operations > XML writing and parsing

Previous chapterNext chapter


Created with the Personal Edition of HelpNDoc: Experience the Power and Simplicity of HelpNDoc's User Interface