Working with XML Files

Does anyone have any suggestions for working with XML files of exported tag data? When working with CSV files it’s very easy to sort and filter on various fields, but there are a number of limitations with CSV exports. Up to this point I’ve used Notepad++ for working with XML files, but searching and replacing are very tedious. For example, if I want to sort the XML file based on data type, I don’t think that’s even possible. But maybe I’m using the wrong tool.

Any suggestions?

I suggest learning to work with the addTag and editTag system functions. This will make your life much easier.

Interesting suggestion. So you just use something like browseTags to return the tag array you’re looking for, and then editTags to make changes? Have you built some sort of GUI (or are you aware of one) to make the process quicker?

I’ve had a lot of success exporting the tags to csv then using the system.tag.edit to programmatically go through the tags to make my changes. Just edit the csv file to include the tag path and build extra columns in the csv file to accommodate the new info such as OPC server or OPC path etc. Make the first column in the csv file a Boolean that tells ignition to process the row this way you can target only parts of the csv file. For example

If row[0] == 1:
system.tag.edit(…)