LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Error Codes Parsing Error

Hi,

I am creating a tool for managing user error codes. What I realized is that the "xxx-errors.txt" files, shipped with LabVIEW, are prepared without escaping special characters (' " < > &) in the text nodes (in the error descriptions). This means that it is almost impossible to load this file using built-in LabVIEW tools for XML. I have created my custom converter for special characters (figure below) but it fails with "<" character since it returns the wrong line in "Parse Error" output. However, it's not my point that I don't know how to work this around. I know that I still can parse the text with the proper use of regex, but I would like to know what is the purpose of formatting the data with XML, but in the way that it is incompatible with the tools for it? It's totally brainless IMO...

xml.png

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 1 of 3
(2,670 Views)

Did you end up making a tool that works to load a custom error file? If you did, and made it available, I would definitely use it.

Marc Dubois
0 Kudos
Message 2 of 3
(2,518 Views)

@bienieck wrote:

but I would like to know what is the purpose of formatting the data with XML, but in the way that it is incompatible with the tools for it? It's totally brainless IMO...

 


There's no purpose.

 

It was implemented as it is, and it worked. Nobody looked into validating the XML, nobody cared.

 

Someone made a booboo, and now it might be difficult to correct it, or at least easier to not correct it.

 

Maybe best to post this in the idea exchange: Properly format error code XML file, or something like that. Post the link here (and cross post the link to this thread) to actually get some kudo's.

 

I know I've run unproperly formatted XML files from NI this before. Not sure if it was the error codes file though.

0 Kudos
Message 3 of 3
(2,511 Views)