Convert XML to BSON
Turn XML files into BSON. One BSON document with the same keys in order; a top-level list is wrapped under the key items and any other value under value.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop XML files on the dialor turn it to pick what to do
XML becomes one BSON document.Keys keep their order, and values keep their types.
What you get
One BSON file with the same keys in the same order as the XML. Integers, floats, booleans, null, text, nested objects and lists keep their types.
A top-level list is wrapped under the key items. Any other top-level value is wrapped under the key value.
What changes
Dates stay text. BSON has a date type, but the conversion does not turn date strings into it.
Integers beyond the signed 64-bit range become floats.
When it stops
The conversion stops with
input_corruptedwhen the file could not be parsed. Check that the XML is well formed before you convert it again.To go the other way, use BSON to XML.
XML and BSON.What each format is.
The formats
XML
XML documents and data.
- Extensions
- .xml
- MIME type
- application
/xml - Kind
- Text and data
BSON
MongoDB's binary document encoding, JSON with dates and binary fields.
- Extensions
- .bson
- MIME type
- application
/bson - Kind
- Text and data
In your code.The same XML to BSON conversion through the API, for your app or your agent.
$ cv convert report.xml report.bson$ cv convert report.xml report.bsonQuestions.What people ask about XML to BSON.
Yes. The BSON document has the same keys in the same order as the XML.
No. Dates stay text.
Integers beyond the signed 64-bit range become floats. Integers inside that range keep their type.
You get one file, holding one BSON document.