How to store XML in MongoDB? How to store XML in MongoDB? mongodb mongodb

How to store XML in MongoDB?


You make a good point wrt. avoiding the necessity to parse JSON before persisting it to MongoDB, imo. You may or may not find commercial .NET products (libraries) tackling this general problem already.

Should you go for your own implementation, FWIW, I've been thinking of a document order-friendly general encoding of XML within JSON, recently, which I believe is round-trippable, with or without XML namespaces, and may inspire you.

Here's the PoC, in my answer to this other question ("xml to json mapping challenge") :

https://stackoverflow.com/a/35810403/1409653

'HTH,