LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XML Stream

Hi, 

 

I want to parse an XML stream and I don´t have a clue how to use the XML Vi without a file reference?

Any help?

 

Best regard

Helmut

0 Kudos
Message 1 of 7
(3,255 Views)
What "XML VI"? Are you referring to the XML functions in LabVIEW, or are you using a separate third-party library? If you're referring to the LabVIEW functions, then there are examples that ship with LabVIEW showing you how to use them. Help -> Find Examples. Have you looked in there?
0 Kudos
Message 2 of 7
(3,236 Views)

I meant the built in LabVIEW VIs from programming > file i/o.

Unfortunatley all examples are based on xml files which I don´t have.

0 Kudos
Message 3 of 7
(3,217 Views)

jojp wrote:

I meant the built in LabVIEW VIs from programming > file i/o.


If you are using the LabVIEW schema then you can simply use the Flatten to XML and Unflatten to XML functions. They work with strings. If you have your own schema, the the XML Parser VIs will work with a string input rather than a file input. See the "Query XML Document for a Single Node" example that ships with LabVIEW.

 


Unfortunatley all examples are based on xml files which I don´t have.


I don't understand what this means.

 

0 Kudos
Message 4 of 7
(3,204 Views)

I have a regular updated stream of strings with xml content.

But all NI LabvIEW VIs use need a reference which is created by a file open VI. But I don´t open a file I have just a string.

 

Now I use the "regular expression"-VI from the Programming > String palette to parse my stream and to extract the node I´m interested in.

 

0 Kudos
Message 5 of 7
(3,182 Views)

@jojp wrote:

But all NI LabvIEW VIs use need a reference which is created by a file open VI.


That is simply not true. Check the documentation... The Load VI is polymorphic and will work with either a file or a string. Did you look at the example I pointed out? That works with a string input. From a front panel string control.

Message Edited by smercurio_fc on 11-16-2009 10:20 AM
0 Kudos
Message 6 of 7
(3,158 Views)

You are right and I´m wrong. I have overseen that there is an polymorphic VI. Thanks for your help.

At the moment my VI crashes but I think I can fix this problem.

0 Kudos
Message 7 of 7
(3,129 Views)