XML is one way to organize information in a tree-structured manner. However, I am looking for a mechanism that lets my software applications conveniently and efficiently store, retrieve and manipulate arbitrary information organized in a tree-structured manner.
Since much of the information my applications need to store is binary with no obvious text form, and overhead of translating back and forth between text and binary forms is too substantial, I prefer something that lets me applications store, retrieve and manipulate each element of information in its native [usually binary] form.
My application will be manipulating the structure of information in many ways and in real time, so these processes must be efficient. One typical and common example: my applications will move elements around, and every sub-element below that element (its "child elements") should move around with it automatically (without data actually being moved in memory). I imagine this would be done by each element having a "parent", so just changing the ID of the parent would change where that entire sub-hierarchy is located in the overall tree structure. Or something along these lines.
Bottom line: do any binary alternatives to XML exist, especially any that leave binary data in its native form?
I do not want to embed binary data into XML. And I prefer a solution that includes a (C compatible) function library of routines to add items, delete items, manipulate the structure, save, load, etc.
Some Info:
Binary XML: http://en.wikipedia.org/wiki/Binary_XML
Binary JSON: http://en.wikipedia.org/wiki/BSON