From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-21-2009 03:20 PM
After loading and populating, I want the save button make the reverse operation.
That is, take the control values (that could have been changed by the user), and save them in the same XML file.
I have a problem for the operation of "find & change an attribute of an element", I'm stuck in the property/invoke nodes
05-21-2009 03:40 PM
The array that you have on the front panel is actually an indicator, not a control, so a user would not be able to edit the values while the VI is running. Once you change it to a control you will need to use a local variable to write to it in the "Load" event case. In the "Save" event case you would use the control's terminal to get the new values.
Since you are providing the array on the front panel a user would have the ability to add/delete "register" nodes via the right-click menu. Thus, the easiest thing to do is to simply recreate the new tree based on the new data rather than figuring out which nodes got deleted and which nodes got changed. If you open the Example Finder and search for "XML" you can take a look at the "Write Test Data File" example. It shows you how to write out a new XML file. Your code would not nearly be as wide since your XML structure is fairly simple.
If you do not want the user to be able to add/delete nodes then you must do at least 2 things:
05-22-2009 02:10 AM
05-22-2009 03:39 AM
05-22-2009 09:33 AM
02-15-2011 11:20 PM
Hello,
I would like to know how to extract xml node attributes without knowing the names of those attributes. Is it possible using the XML parser of labvew 2010?
For example say I am reading in the below xml structure:
<node_1>
<node_2 name = second_node> text </node_2>
<node_3 type = a>
<node_4> text </node_4>
</node_3>
</node_1>
The programmer has no knowledge of the xml structure or content when writing. How do I extract the attributes of each node?
Thank you,
labjunky
02-17-2011 09:21 AM
Hello,
Would you mind statring a new thread with your question? This will increase the possibility that others will respond since this thread is so old. Thanks!
-Cody C
01-27-2012 01:37 AM
Hi,
I have used an example for XML parsing for LV2009. Now I would like to use it for LV 8.x. I realized that all the Vis were properly recognized but one, the picture shows which one. Is there an example program that does the same (parsing the Attributes of an XML file and returning its Attribute value)?
Thanks for any hints
Y3G