Convert CBOR to XML
Turn CBOR 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 CBOR files on the dialor turn it to pick what to do
CBOR data as XML elements.Objects become elements under one root. Every value is written as text.
What you get
One XML file. The CBOR objects become elements inside a single root element, and every value becomes text. Characters that a tag name cannot hold are turned into underscores.
A list repeats its element, once for each item in the list.
Attributes and text
Keys that start with @ become attributes. Because an attribute holds only text, a list or an object under such a key is written as JSON text. A key named #text becomes the element's own text.
What changes
Byte strings become base64 text. Epoch times become ISO 8601 text.
Lists lose some shape. An empty list disappears, because there are no items to repeat. A list of lists is flattened into one run of repeated elements.
To go the other way, use XML to CBOR.
When it fails
The conversion stops with
input_corruptedwhen the file could not be parsed.
CBOR and XML.What each format is.
The formats
CBOR
Concise Binary Object Representation, the binary JSON of IoT and web standards.
- Extensions
- .cbor
- MIME type
- application
/cbor - Kind
- Text and data
XML
XML documents and data.
- Extensions
- .xml
- MIME type
- application
/xml - Kind
- Text and data
In your code.The same CBOR to XML conversion through the API, for your app or your agent.
$ cv convert report.cbor report.xml$ cv convert report.cbor report.xmlQuestions.What people ask about CBOR to XML.
No. Every value becomes text. Byte strings become base64 text and epoch times become ISO 8601 text.
It disappears. A list repeats its element once per item, so an empty list leaves nothing behind.
Start the key with @. That key becomes an attribute, and a list or an object under it is written as JSON text.
The CBOR file could not be parsed.