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.

  1. 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.

  2. 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.

  3. 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.

  4. When it fails

    The conversion stops with input_corrupted when the file could not be parsed.

CBOR and XML.What each format is.

The formats

From · CBOR

CBOR

Concise Binary Object Representation, the binary JSON of IoT and web standards.

Extensions
.cbor
MIME type
application/cbor
Kind
Text and data
To · XML

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.

terminal
$ cv convert report.cbor report.xml
$ cv convert report.cbor report.xml

Questions.What people ask about CBOR to XML.

01OF 04

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.

More conversions.Other ways in and out of CBOR and XML.