Skip to content

Latest commit

 

History

History
43 lines (22 loc) · 791 Bytes

File metadata and controls

43 lines (22 loc) · 791 Bytes

fromxml utility -- converts XML to BSON.

NOTE: PRELIMINARY IMPLEMENTATION (at time of this writing).

Usage

fromxml < infile.xml > outfile.bson

Run fromxml -h for options.

Interpretation of structure

(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" } }

Numerics

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.