How to create function block via C# to read XML file?
I want to create function block to PLCnext to read XML files elements. I want to read "System.Xml". When I did add "System.Xml" I got following errors that attaches to this question. I want to know how to add System.XML to my solution.
Thank you ahead for help and support. {jcomments off}{jcomments on}
Comments
Hello,
system.xml is currently not supported by the real time C# runtime.
Probably you can do it via C++.
I do recommend not to use parsing operations in a real time program. (if files are large)
You should consider moving these operations to the non realtime part of the application.
Especially if the XML parsing is used to find starting values or something similar.
- Marcel
Hello Marcel,
thank you for your information.
We would like to know if you are planning on providing a C# serializer in an upcoming release, either for xml or json.
If you have it in the development pipe we might not want to invest in workarounds. It might be worth the wait.
The reason is that serialization functions tend to be time-consuming, and this may affect the real-time performance of the eCLR. So, it is recommended that serialization functions are called outside the real-time context.