10-08-2020 07:18 AM
Hello!
I have a XML file with some pulses and cicles informations. I need to cread a 2D graphic with it.
My program:
Problems:
1 - Can I just get the cluster I want? I needed to create 3 cluster to see the cluster I want.
2 - I want to creat a 2D graphic (pulses x cicle) but I can't remove " ; " from val.
Is there an easy to creat this graphic ?
XML FILE:
10-08-2020 07:35 AM
Hi biaverly,
@biaverly wrote:
1 - Can I just get the cluster I want? I needed to create 3 cluster to see the cluster I want.
2 - I want to creat a 2D graphic (pulses x cicle) but I can't remove " ; " from val.
Is there an easy to creat this graphic ?
1. When parsing a XML file you need to provide the exact same data structure as is use din the file, so your approach using this big cluster containing sub-clusters is right. You can easily Unbundle after the parsing…
2. Convert the "Val" text into numeric data, maybe using SpreadsheetStringToArray. Then get the data columns you need and build a XY plot for a XY graph…
10-08-2020 08:55 AM
Tu get the cluster you want directly you need to use the LabVIEW parser with an XPath expression (I recommend you look at some tutorials on the net it is not intuitive). You next have to remove the first line (I use a regular expression for that but there are different ways to do it). Then as GerdW suggested use the Spreadsheet String to Array to get the data and convert it to numeric.
You will have to change the XPath expression to get different data.
Ben64
10-08-2020 09:35 AM
I think it would have been better to carry on in this thread : https://forums.ni.com/t5/LabVIEW/Easy-XML-Labview/m-p/4089018
or at least to mention it for reference.
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus