LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Floating point numbers into XML file

Hi,

I am a learner in Labview and I am using Labview 8.5 version.

when I use FlattentoXML component to convert floating point numbers ( having more than 5 decimal points) into XML, the output contains alway 5 decimal points.

 

But, I want exact decimal number to be displayed as XML. i.e 0.263746 should not be displayed as 0.26375 in XML.

Do you have any suggestions ?

0 Kudos
Message 1 of 8
(4,187 Views)

you can use "Flatten To XML"

0 Kudos
Message 2 of 8
(4,173 Views)

20341i65BF6FB49F1DEF30

0 Kudos
Message 3 of 8
(4,168 Views)

If your output is a number then use a "format into string"

 

20343i481701FC89EA1E7C

0 Kudos
Message 4 of 8
(4,165 Views)

Hi,

I would like to receive an XML output like this.

Could you tell how it can be acheived ?

 

<DBL>
<Name></Name>
<Val>0.79857935879</Val>
</DBL>

0 Kudos
Message 5 of 8
(4,161 Views)

Simple define like this

 

20349iE2EDD84AB137D272

0 Kudos
Message 6 of 8
(4,157 Views)

I tested it and could not see your problem in Labview 2009. So it is perhaps a bug in your Labview version. You can use this VI as a workaround.

 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 8
(4,152 Views)

 

I checked in LabVIEW 8.6.1 and the XML reports 11 decimal places.

 

See this post regarding five places of precision:

 

Floating point precision of "Flatten to XML"

 

If you're using 8.5, this issue may have been fixed in 8.6...

 

 

0 Kudos
Message 8 of 8
(4,132 Views)