Re: [xml] encoding floats



Jeff Abrahamson wrote:
> I'm not grokking a detail about libxml:
>
> I want to store matrices, so I want to encode two ints (the
> dimensions) and a whole bunch of doubles (the elements of the
> matrices).
>
> It's not clear to me how to encode the numbers except to sprintf and
> sscanf them, which seems kludgy.
>
> Can someone point me in the right direction?

XML is completely agnostic to the actual content.
libxml2 will happily return the content as utf-8 strings, and it
is your responsability to parse them and extract whatever types
you expect there.

Regards,
                Stefan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]