You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by danydyn <da...@gmail.com> on 2010/07/01 14:37:38 UTC

floating point numbers output format

Hi,
I am looking for a way to make XmlBeans output a floating point number in a
specific format.
The number type is xs:double and I want it to always print two fraction
digits after the decimal point, that is, X.XX.
I haven't found a way to do it so far.

Help is greatly appreciated.

Thanks,

Dan.
-- 
View this message in context: http://old.nabble.com/floating-point-numbers-output-format-tp29045157p29045157.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Re: floating point numbers output format

Posted by Jacob Danner <ja...@gmail.com>.
I don't know about double, but decimal has a fractionDigits constraint that
should do what you are looking for.
http://www.w3.org/TR/xmlschema-2/#rf-fractionDigits
-jacobd

On Thu, Jul 1, 2010 at 5:37 AM, danydyn <da...@gmail.com> wrote:

>
> Hi,
> I am looking for a way to make XmlBeans output a floating point number in a
> specific format.
> The number type is xs:double and I want it to always print two fraction
> digits after the decimal point, that is, X.XX.
> I haven't found a way to do it so far.
>
> Help is greatly appreciated.
>
> Thanks,
>
> Dan.
> --
> View this message in context:
> http://old.nabble.com/floating-point-numbers-output-format-tp29045157p29045157.html
> Sent from the Xml Beans - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>