A simple yet flexible library to compose or parse XML data in CODESYS based PLC's via the following function blocks;
The solution can handle xml-parsing in two ways:
1) Reading an entire XML file into a pre-allocated memory-buffer
2) Read partially chunks into a smaller and optimized buffer
| chosen method | advantage | disadvantage |
|---|---|---|
| 1 | fast and relatively easy to implement | Larger PLC memory requirement due to loading the file into a pre-allocated memory-buffer |
| 2 | widely applicable due to small memory footprint | relative slow parsing of large files. Relatively more complex to implement |
Examples for both parsing methods are provided, which can act as a starting point for your implementation
Download are hosted on github;
https://github.com/HAHermsen/co5e-XML-File-Handling
Basic library idea and coding: H.Hermsen.
bugfixes, testing: i-campbell and Aliazzz.
Additional small memory footprint file parsing: TimvH

https://www.linkedin.com/in/hahermsen