When converting to json (or yaml) format, some conventions has been assumed.
A) Three special properties are used to handle some conditions:
- "_t" : property is used for storing the original element name (for instance if we are storing a
<para>
element, we will have a"_t":"para"
property) - "_v" : property is used for storing text context (for instance if we are storing a
<para>my text</para>
element, we will have a"_v":"my text"
property - "_e" : property is used for storing child elements as an array. (for instance if we are storing a
<row><cell></cell><cell></cell></row>
we will have a"_e":[{"_t":"cell"}.{"_t":"cell"}]
property.
B) All other xml attributes are stored using the corresponding property name. (for instance <para style="bold">my text</para>
will convert to {"_t":"para","_v":"my text","style":"bold"}