Storing XML into MongodB or need to convert to JSON?


I have an array of XML data that needs to be stored in MongodB, do I need to convert to JSON/BSON
first before saving or can I save it directly as XML? Thanks

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:users xmlns:ns2="">
        <description>Andy M</description>
        <identityGroupName>All Groups:My Group</identityGroupName>
        <created>Mar 20 2015 08:42:26</created>
        <lastModified>Jul 21 2016 13:05:43</lastModified>
        <lastPasswordChange>Mar 20 2015 08:42:26</lastPasswordChange>
        <description>Bradley H</description>
        // and so on


First of all, read,

Try this -


Another idea would be to use with

existDb comes with in-built REST-ful API. If you used BDB, you would have to implement your own REST API on top of that.