02-19-2018 04:49 AM
Hi, i'm using labview as beginner in labview application. I started to load and interpreter a simple xml file with labview and classical VIs object for xml treatment. I realized my project, i found the nodes correctly, but i have a problem to extract the child and sibling elements of a node. Could anyone suggest me ho to extract a list(sibling) of childs from a node?
So i have to search if exist a block to open a file with a scheme. In labview i think it doesn't exist, correctly?
Thanks Michele
02-20-2018 05:36 AM
Please try to share the XML File you use and the Code Snippet which you tried.
Use XML Grid and check whether your file has proper schema?
02-20-2018 07:47 AM
Thanks for the answer, in the attach there is a simple project to load the file "tabellismo_simple". The problem is to find the instance array of "classe" nodes. There is the file scheme, thank you Michele
02-21-2018 12:57 AM
Please share the Vi with LV2015 and the expected data from the shared file.
02-21-2018 01:55 AM - edited 02-21-2018 01:56 AM
In the attach i post the project with labview 2015.
With NodeChildsArray, i'll expected (or i would) to find an array of instances from node rele
<classe nome="RELE">
<istanza ist="0" nomeMnemonico="Caldaia 1apre">
<istanza ist="1" nomeMnemonico="Caldaia 1chiude">
...
instead it doesn't return the child array correctly
thanks Michele
02-21-2018 04:21 AM
Try like the same for ist and nomeMnemonico
02-21-2018 04:24 AM
Xpath For nomeMnemonico "/impianto/classe/istanza/@nomeMnemonico"
Xpath For ist "/impianto/classe/istanza/@ist"
which will give all Values irrespective of Classe Name so make Loops in such a way Classe values are extracted.
02-26-2018 04:33 AM
Thanks for the answer and i'm sorry about delay for my reply but i was to make core2 course, i had done this, but my problem is to search various children from single class. In your example i couldn't find the addiction of children instance from the parent node. In your example or in my i have to find a list of class children from various node, then i would extract the attributes from the various instance. Your sincerely Michele
02-27-2018 04:40 AM
Thanks for the answer and i'm sorry about delay for my reply but i was to make core2 course, i had done this, but my problem is to search various children from single class. In your example i couldn't find the addiction of children instance from the parent node. In your example or in my i have to find a list of class children from various node, then i would extract the attributes from the various instance. Your sincerely Michele
02-27-2018 11:03 PM
You need to use your xpath in such a way you expect the output.