I finally was able to get back to this and so far 2.6 nightly build, all seems to be working well.
So right now, I've got some code that will take an arbitrary XML document and turn it into a DBObject.
The order of fields now seems to be preserved even if an update operation is performed.
{ "_id" : { "$oid" : "531fd4be30047e316b0d7de3"} , "book" : [ { "_id" : "bk101" , "author" : [ "Gambardella, Matthew"] , "title" : [ "XML Developer's Guide"] , "genre" : [ "Computer"] , "price" : [ "44.95"] , "publish_date" : [ "2000-10-01"] , "description" : [ "An in-depth look at creating applications\n with XML."]}]}
{ "_id" : { "$oid" : "531fd4bf30047e316b0d7dec"} , "book" : [ { "_id" : "bk110" , "author" : [ "O'Brien, Tim"] , "title" : [ "Microsoft .NET: The Programming Bible"] , "genre" : [ "Computer"] , "price" : [ "36.95"] , "publish_date" : [ "2000-12-09"] , "description" : [ "Microsoft's .NET initiative is explored in\n detail in this deep programmer's reference."]}]}
{ "_id" : { "$oid" : "531fd4bf30047e316b0d7ded"} , "book" : [ { "_id" : "bk111" , "author" : [ "O'Brien, Tim"] , "title" : [ "MSXML3: A Comprehensive Guide"] , "genre" : [ "Computer"] , "price" : [ "36.95"] , "publish_date" : [ "2000-12-01"] , "description" : [ "The Microsoft MSXML3 parser is covered in\n detail, with attention to XML DOM interfaces, XSLT processing,\n SAX and more."]}]}
{ "_id" : { "$oid" : "531fd4bf30047e316b0d7dee"} , "book" : [ { "_id" : "bk112" , "author" : [ "Galos, Mike"] , "title" : [ "Visual Studio 7: A Comprehensive Guide"] , "genre" : [ "Computer"] , "price" : [ "49.95"] , "publish_date" : [ "2001-04-16"] , "description" : [ "Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are\n integrated into a comprehensive development\n environment."]}]}
{ "_id" : { "$oid" : "531fd4e93004a1b0b6b4f3de"} , "book" : [ { "_id" : "bk101" , "author" : [ "Gambardella, Matthew"] , "title" : [ "XML Developer's Guide"] , "genre" : [ "Computer"] , "price" : [ "44.95"] , "publish_date" : [ "2000-10-01"] , "description" : [ "An in-depth look at creating applications\n with XML."]}]}
{ "_id" : { "$oid" : "531fd4e93004a1b0b6b4f3e7"} , "book" : [ { "_id" : "bk110" , "author" : [ "O'Brien, Tim"] , "title" : [ "Microsoft .NET: The Programming Bible"] , "genre" : [ "Computer"] , "price" : [ "36.95"] , "publish_date" : [ "2000-12-09"] , "description" : [ "Microsoft's .NET initiative is explored in\n detail in this deep programmer's reference."]}]}
{ "_id" : { "$oid" : "531fd4e93004a1b0b6b4f3e8"} , "book" : [ { "_id" : "bk111" , "author" : [ "O'Brien, Tim"] , "title" : [ "MSXML3: A Comprehensive Guide"] , "genre" : [ "Computer"] , "price" : [ "36.95"] , "publish_date" : [ "2000-12-01"] , "description" : [ "The Microsoft MSXML3 parser is covered in\n detail, with attention to XML DOM interfaces, XSLT processing,\n SAX and more."]}]}
{ "_id" : { "$oid" : "531fd4e93004a1b0b6b4f3e9"} , "book" : [ { "_id" : "bk112" , "author" : [ "Galos, Mike"] , "title" : [ "Visual Studio 7: A Comprehensive Guide"] , "genre" : [ "Computer"] , "price" : [ "49.95"] , "publish_date" : [ "2001-04-16"] , "description" : [ "Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are\n integrated into a comprehensive development\n environment."]}]}
{ "_id" : { "$oid" : "531fd5d030045b3db32abc54"} , "book" : [ { "_id" : "bk101" , "author" : [ "Gambardella, Matthew"] , "title" : [ "XML Developer's Guide"] , "genre" : [ "Computer"] , "price" : [ "44.95"] , "publish_date" : [ "2000-10-01"] , "description" : [ "An in-depth look at creating applications\n with XML."]}]}
{ "_id" : { "$oid" : "531fd5d030045b3db32abc5d"} , "book" : [ { "_id" : "bk110" , "author" : [ "O'Brien, Tim"] , "title" : [ "Microsoft .NET: The Programming Bible"] , "genre" : [ "Computer"] , "price" : [ "36.95"] , "publish_date" : [ "2000-12-09"] , "description" : [ "Microsoft's .NET initiative is explored in\n detail in this deep programmer's reference."]}]}
{ "_id" : { "$oid" : "531fd5d030045b3db32abc5e"} , "book" : [ { "_id" : "bk111" , "author" : [ "O'Brien, Tim"] , "title" : [ "MSXML3: A Comprehensive Guide"] , "genre" : [ "Computer"] , "price" : [ "36.95"] , "publish_date" : [ "2000-12-01"] , "description" : [ "The Microsoft MSXML3 parser is covered in\n detail, with attention to XML DOM interfaces, XSLT processing,\n SAX and more."]}]}
{ "_id" : { "$oid" : "531fd5d030045b3db32abc5f"} , "book" : [ { "_id" : "bk112" , "author" : [ "Galos, Mike"] , "title" : [ "Visual Studio 7: A Comprehensive Guide"] , "genre" : [ "Computer"] , "price" : [ "49.95"] , "publish_date" : [ "2001-04-16"] , "description" : [ "Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are\n integrated into a comprehensive development\n environment."]}]}
{ "_id" : { "$oid" : "531fd62f30043ce65b96eccc"} , "book" : [ { "_id" : "bk101" , "author" : [ "Gambardella, Matthew"] , "title" : [ "XML Developer's Guide"] , "genre" : [ "Computer"] , "price" : [ "44.95"] , "publish_date" : [ "2000-10-01"] , "description" : [ "An in-depth look at creating applications\n with XML."]}]}
{ "_id" : { "$oid" : "531fd62f30043ce65b96ecd5"} , "book" : [ { "_id" : "bk110" , "author" : [ "O'Brien, Tim"] , "title" : [ "Microsoft .NET: The Programming Bible"] , "genre" : [ "Computer"] , "price" : [ "36.95"] , "publish_date" : [ "2000-12-09"] , "description" : [ "Microsoft's .NET initiative is explored in\n detail in this deep programmer's reference."]}]}
{ "_id" : { "$oid" : "531fd62f30043ce65b96ecd6"} , "book" : [ { "_id" : "bk111" , "author" : [ "O'Brien, Tim"] , "title" : [ "MSXML3: A Comprehensive Guide"] , "genre" : [ "Computer"] , "price" : [ "36.95"] , "publish_date" : [ "2000-12-01"] , "description" : [ "The Microsoft MSXML3 parser is covered in\n detail, with attention to XML DOM interfaces, XSLT processing,\n SAX and more."]}]}
{ "_id" : { "$oid" : "531fd62f30043ce65b96ecd7"} , "book" : [ { "_id" : "bk112" , "author" : [ "Galos, Mike"] , "title" : [ "Visual Studio 7: A Comprehensive Guide"] , "genre" : [ "Computer"] , "price" : [ "49.95"] , "publish_date" : [ "2001-04-16"] , "description" : [ "Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are\n integrated into a comprehensive development\n environment."]}]}
{ "_id" : { "$oid" : "531fda11300481c510c4fc02"} , "book" : [ { "_id" : "bk101" , "author" : [ "Gambardella, Matthew"] , "title" : [ "XML Developer's Guide"] , "genre" : [ "Computer"] , "price" : [ "44.95"] , "publish_date" : [ "2000-10-01"] , "description" : [ "An in-depth look at creating applications\n with XML."]}]}
{ "_id" : { "$oid" : "531fda11300481c510c4fc0b"} , "book" : [ { "_id" : "bk110" , "author" : [ "O'Brien, Tim"] , "title" : [ "Microsoft .NET: The Programming Bible"] , "genre" : [ "Computer"] , "price" : [ "36.95"] , "publish_date" : [ "2000-12-09"] , "description" : [ "Microsoft's .NET initiative is explored in\n detail in this deep programmer's reference."]}]}
{ "_id" : { "$oid" : "531fda11300481c510c4fc0c"} , "book" : [ { "_id" : "bk111" , "author" : [ "O'Brien, Tim"] , "title" : [ "MSXML3: A Comprehensive Guide"] , "genre" : [ "Computer"] , "price" : [ "36.95"] , "publish_date" : [ "2000-12-01"] , "description" : [ "The Microsoft MSXML3 parser is covered in\n detail, with attention to XML DOM interfaces, XSLT processing,\n SAX and more."]}]}
{ "_id" : { "$oid" : "531fda11300481c510c4fc0d"} , "book" : [ { "_id" : "bk112" , "author" : [ "Galos, Mike"] , "title" : [ "Visual Studio 7: A Comprehensive Guide"] , "genre" : [ "Computer"] , "price" : [ "49.95"] , "publish_date" : [ "2001-04-16"] , "description" : [ "Microsoft Visual Studio 7 is explored in depth,\n looking at how Visual Basic, Visual C++, C#, and ASP+ are\n integrated into a comprehensive development\n environment."]}]}
What kind of issues (i.e., limitations) will I run into with mongo by representating all values as an array?
I noticed one limitation is that I couldn't do a multi key sort. Any other glaring holes with this kind of implementation/representation of XML data?