Is it possible to parse a specific value from an XML file (or another type of file) and write the value as initialization value in the declaration of a variable?
Thanks,
Jefferson
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can read a file at first scan, but as file operations are asynchronous (takes more than one task cycle), you need to add some code to block the execution requiring the variable to be correctly initialized.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also, I am testing the XML Utility library. I downloaded this free library from the Codesys store and installed the package, but the library says that I need a license:
Hi,
Is it possible to parse a specific value from an XML file (or another type of file) and write the value as initialization value in the declaration of a variable?
Thanks,
Jefferson
You can read a file at first scan, but as file operations are asynchronous (takes more than one task cycle), you need to add some code to block the execution requiring the variable to be correctly initialized.
How do I read from the XML file?
Also, I am testing the XML Utility library. I downloaded this free library from the Codesys store and installed the package, but the library says that I need a license:
It is not free of charge, but it is cheap though ;-)
https://store.codesys.com/en/iiot-libraries-sl.html
As you stated :
So I beg you may use some easier format to read, or just do some string search to the property you need, without using DOM.