As part of my graduation I have to migrate XML files to CouchDB. To convert the structure of the file to JSON is no problem at all, but there's one part which I can't figure out how to actually convert:
<p>We beg to send us immediately [...] <note>
<p>In the original, [...]</p>
</note><lb/><add>by post</add> one copy of
<title>A Book</title> by <persName>
<choice><abbr>Mrs.</abbr><expan>Misses</expan></choice>Jane Smith</persName>.
As soon<lb/> we know the <choice>
<sic>prize</sic>
<corr>price</corr>
</choice>the amount [...]<lb/> by post.<lb/>
</p>
I'd like to stick to JSON and don't use XML within JSON, as I would need to implement XML capabilities to my program then.
What would be 'best practices' or solutions to this problem?