XML as an IPLD format

As I understand it, implementing https://github.com/ipld/interface-ipld-format and adding a multicodec code are all that are needed to have a “plug in” for ipfs that supports a new IPLD format (such as git, etc).

I’m wondering what people would think about something like this for XML? Needs a canonical mapping to CBOR of course, so there is http://www.jsonml.org/ which provides a properly reversible canonical mapping of any XML to JSON (which can then map to CBOR in the obvious way). The only change from this that we need is a way for there to be links – my proposal would be that any attribute whose content is /ipfs/<valid-CID> would be treated as a link to that CID.

1 Like

Converting it to CBOR would work I guess. Then you wouldn’t need to spend time on implementing your of format implementation.

But you could also implement a new XML format directly and store the raw XML.

Yes, XML format where the raw XML is stored is what I’m talking about. But there needs to be a mapping to the IPLD data model for that to work

Indeed, your format implementation would then need to provide a mapping for the traversals.