LabSeb Posted February 21, 2014 Report Share Posted February 21, 2014 Hi, i'm trying to read and write XML-Files with LabView. I figured out that JKI EASY XML helps a lot. Still i have to create a cluster describing the structure of the XML-File i want to read or write. I have a large XML-Schema describing the structure of the XML-File. Is there any way to create the cluster automatically? The manual work would be a lot of effort. I thought about creating the cluster dynamically but it seems to be not possible within labview. Another option could be to edit the .vi file using other software/programming language but at least with a text editor i couldn't achieve readable code. Is the file format documented? Any ideas? Thanks Sebastian Quote Link to comment
jzoller Posted February 22, 2014 Report Share Posted February 22, 2014 Hi Sebastian, You can translate the xml to labview using the scripting functions. It's not trivial, though. You'll need to understand VI server and references reasonably well. You can turn on the scripting functions in more recent versions of LV under Options>>VI Server>>VI Scripting. It's a little dated, but check the GenINI code at http://lavag.org/topic/11920-genini-generate-readwrite-code-for-ini-files/. In particular, how typedefs are generated. Joe Z. Quote Link to comment
LabSeb Posted February 24, 2014 Author Report Share Posted February 24, 2014 Hi Joe, thanks for you reply. I stumbled over VI-Scripting a few days ago but it's still all new to me. I'll have a closer look to your INI script as an example- Sebastian Quote Link to comment
MartinPeeker Posted February 24, 2014 Report Share Posted February 24, 2014 This might be a good use case for Variant Attributes. Quote Link to comment
Bobillier Posted February 25, 2014 Report Share Posted February 25, 2014 Hi You can individually extract your datas if you know their names like in my exemple. Regards Eric Quote Link to comment
LabSeb Posted February 25, 2014 Author Report Share Posted February 25, 2014 Thanks for the two advices i think i'm going to use both. I'm doing some progress but the result will probably work only for my XML-Schema or very similar schemata. Up to know my VI-Script creates a lot of nice combo boxes from my xs:simple types. @Eric: I tried to use these labview functions Album: LabSeb 1 images 0 comments but the didn't work for XML-Schemata. Instead i used some loops. They will be replaced by this invoke node. Quote Link to comment
tjshelley Posted July 9, 2015 Report Share Posted July 9, 2015 Did you manged to get this working, using invoke nodes? I am try to parse XML data to a cluster on a cRIO-9022, unfortunately not have much luck. Thanks, Tim Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.