Convert BSON to XML
Turn BSON files into XML. Objects become elements inside one root element and every value becomes text, with characters a tag name cannot hold turned into underscores.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop BSON files on the dialor turn it to pick what to do
BSON documents as readable XML.Each document becomes elements under one root, with every value written as text.
What you get
One XML file. Objects become elements inside a single root element, and every value is written as text. Characters that a tag name cannot hold are turned into underscores.
ObjectIds become hex text, dates become ISO 8601 text and binary data becomes base64.
How keys and lists map
Keys that start with @ become attributes. Lists and objects placed in an attribute are written as JSON text. A key named #text becomes the element's own text.
A list repeats its element, once for each item. An empty list therefore disappears, and a list of lists is flattened into one run of elements.
When it stops
If the file cannot be parsed, the conversion stops with
input_corrupted. The BSON file is damaged or is not valid BSON.To go the other way, use XML to BSON.
BSON and XML.What each format is.
The formats
BSON
MongoDB's binary document encoding, JSON with dates and binary fields.
- Extensions
- .bson
- MIME type
- application
/bson - Kind
- Text and data
XML
XML documents and data.
- Extensions
- .xml
- MIME type
- application
/xml - Kind
- Text and data
In your code.The same BSON to XML conversion through the API, for your app or your agent.
$ cv convert report.bson report.xml$ cv convert report.bson report.xmlQuestions.What people ask about BSON to XML.
No. Every value becomes text. Dates are written as ISO 8601 text, and ObjectIds as hex text.
Binary data is written as base64 text.
A list repeats its element once per item. With no items, no element is written.
Start the key with @ in the BSON document. That key becomes an attribute on its element.