LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW webservice: How to format the published XML data

Hi,

 

Im trying to  publish some measurement data with LabVIEW webservice and read the data with Android client. However i have some problems with the XML output from the LabVIEW webservice.

 

I want to publish the data in in this form:

<Response>

 -<Terminal>

        <Parameter> Temperature</Parameter>

         <Value> 5 </Value>

        <Unit> ºC </Unit>

       <Description> Measurements from Sensor 1</Description>

   </Terminal>

</Response>

 

Any ideas how i can do this? i havent found any good example on how to format the XML output this way. 

0 Kudos
Message 1 of 4
(2,998 Views)

Create a cluster with that specification and the XML should look like that. *does quick test*

Hmm, looks like you'll need to create some special function, a simple unbundle and Format into string.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 4
(2,978 Views)

Hello,

Does anyone of you got some good example? I am just trying same thing with a compactRIO as web server, where it will receive a cluster for make some settings. My big question is how can I read this cluster to early apply an unbundle function and use my cluster elements?

 

Thanks in advance!

 

Alberto.

0 Kudos
Message 3 of 4
(2,827 Views)

Hi,

 

You can format the data using Format Into String as shown in the attached snippet. Is this maybe something you can use?

 

Willy

Willy
0 Kudos
Message 4 of 4
(2,718 Views)