LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read XML file using Automatic ref No

Hi smercurio,

 

0 Kudos
Message 21 of 28
(1,677 Views)

Hi Smercurio

                  Hi once i have send you MSXML lib files in that how we should use the MSXML to write it is asking for parent node ref no.can you help me with example using the MSXML vi how to use that

0 Kudos
Message 22 of 28
(1,677 Views)
I don't understand what you're trying to do. Throughout this whole discussion you've never uploaded the XML file that you're working with, so I have no idea what you're trying to accomplish. Please upload your code and your XML file and indicate where the error is. Have you looked at the example that ships with the MSXML library? It shows you how to replace nodes.
Message 23 of 28
(1,663 Views)
Hi no problem in reading loading the xml it is fine.i just seen ine vi write xml .vi .i dont know how to use that i need to create new xml file using that vi is that possible
0 Kudos
Message 24 of 28
(1,658 Views)
There is no "MSXML Write XML" VI in the library. There's a "MSXML Save XML", and there's a "MSXML write elements to xml" VI, but this latter VI is a subVI and is not intended to be used directly. 
0 Kudos
Message 25 of 28
(1,646 Views)
ya u  are write i need to know how we should use "MSXML write elements to xml" how it is used as sub vi.can u tell me with an example using this Vi
0 Kudos
Message 26 of 28
(1,637 Views)

You should not use that subVI directly. You should use the "MSXML Edit XML" VI. As the example that ships with the library clearly shows, you need to create the array of clusters that consists of your XML content in DOM form. If you look at the "Database Editor" example you will find that a subVI called "Person table to person XML-element" VI is being used to convert the table to the array of clusters. You need to do the same thing, based on your XML structure. While there is almost next-to-nothing documentation for this library, the home page for the toolkit describes this cluster.

 

Basically, each node in your XML structure becomes another element in the array of XML elements. I'm busy right now, but later I'll try to put together an example using the XML structure you showed in your other thread.

0 Kudos
Message 27 of 28
(1,629 Views)
Attached is an example that creates your XML file assuming one did not previously exist. Note that if you want to edit an existing file, then you need to do it differently since you will be replacing nodes instead of inserting/adding nodes.
0 Kudos
Message 28 of 28
(1,621 Views)