fromxml utility -- converts XML to BSON.
NOTE: PRELIMINARY IMPLEMENTATION (at time of this writing).
fromxml < infile.xml > outfile.bson
Run fromxml -h for options.
(Note this may evolve, but this version...)
asdf
becomes:
{ foo: "asdf" }
asdf becomes:
{ foo: { x: "33.3", foo: "asdf" } }
3asdf becomes:
{ a: { b: "3", c: "asdf" } }
Use -t or -f =options to set rules for interpretation of datatypes.
3
would by default yield: { x : "3" }
with "-t n": { x : 3 } (where the 3 is an int32)
with "-t f": { x : 3.0 }
That is to say the 'n' option uses the smallest type that makes sense.
More data types will be done later hopefully.