Binary Encoded Floating Point

View: New views
3 Messages — Rating Filter:   Alert me  

Binary Encoded Floating Point

by Wilfred Springer-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

All,

I am trying to use Fast Infoset to serialize an XML document holding geographical data. Hexdumping the output reveals that the longitudes and latitudes are still serialized as text.

There are several documents that discuss the fact that the framework should be able to serialize numbers to a binary equivalent based on some patterns, but I can't figure out how to do that.

Any clues?

Wilfred

Wilfred Springer | Software Architect | TomTom | wilfred.springer@... | +31 646 720 990

Re: Binary Encoded Floating Point

by Paul Sandoz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Wilfred,

The fi/samples contain a number of examples.

For example, the PrimitiveTypesWithElementContentSample example creates
an FI document using the SAX API that contains binary values for bytes,
ints and floats [2].

Does this help?

I have just created a simple command line utility that takes a schema
and an XML document and will convert the XML document to an FI document,
and where appropriate convert text content and attribute values to
binary data based on the XS data types. I plan to blog about this today,
when done i will post a link.

Paul.

[1] http://fisheye5.cenqua.com/browse/fi/samples/src/samples/typed
[2]
http://fisheye5.cenqua.com/browse/~raw,r=1.4/fi/samples/src/samples/typed/PrimitiveTypesWithElementContentSample.java




Wilfred Springer wrote:

> All,
>
> I am trying to use Fast Infoset to serialize an XML document holding
> geographical data. Hexdumping the output reveals that the longitudes and
> latitudes are still serialized as text.
>
> There are several documents that discuss the fact that the framework
> should be able to serialize numbers to a binary equivalent based on some
> patterns, but I can't figure out how to do that.
>
> Any clues?
>
> Wilfred
>
> *Wilfred Springer* | Software Architect | TomTom |
> wilfred.springer@... <mailto:wilfred.springer@...> | +31
> 646 720 990
>

--
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Binary Encoded Floating Point

by Paul Sandoz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Paul Sandoz wrote:
> I have just created a simple command line utility that takes a schema
> and an XML document and will convert the XML document to an FI
> document, and where appropriate convert text content and attribute
> values to binary data based on the XS data types. I plan to blog
> about this today, when done i will post a link.

Here it is:

http://blogs.sun.com/sandoz/entry/xml_to_typed_fi_utility

Paul.

--
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price!