26 October 2010

String presentation of a Double

I am trying to create an XML document. I like all elements to be String elements in the Java file. Don’t want to mess things up having different kind of elements there.
So the question is how to transfer a double into String without loosing the formatting ? something like 1.323434E7 is not what I want to be presented in the XML format. There should be a way to create a complete String presentation of a Double.
I will update this post as I figure it out. I have remembered the vice versa operation, from String to Double but not this one. It is one of those obvious things that you can not remember when it is almost HOME time!

No comments:

Post a Comment