11-12-2009 04:37 AM
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
11-12-2009 09:09 AM
11-13-2009 07:41 AM
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.
11-13-2009 11:53 AM
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.
11-16-2009 01:41 AM
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.
11-16-2009 10:20 AM - edited 11-16-2009 10:20 AM
@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.
11-17-2009 07:11 AM
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.