Hey All,
I have an issue saving XML into Mongo. Here is a quick example of what I
am trying to do:
<cfxml variable="Temp">
<root>
<child Id="1">
<Element1 id="1">123</Element1>
<Contact>
<ContactName>George Washington</ContactName>
</Contact>
</child>
<child Id="2">
<Element1 id="1">456</Element1>
</child>
</root>
</cfxml>
<cfset MongoCollectionsave('mongodb', 'temp', temp)>
When I run this, this is the record that I receive in Mongo:
{ "_id" : { "$oid" : "504a1bcec70bbc1e8776b5cc"} , "root" : { "child" : [ {
"#text" : [ { } , { } , { }] , "Element1" : { "#text" : { }} , "Contact" :
{ "ContactName" : { "#text" : { }} , "#text" : [ { } , { }]}} , {
"Element1" : { "#text" : { }} , "#text" : [ { } , { }]}] , "#text" : [ { }
, { } , { }]}}
As you can see, the element names are there, but none of the data. Is
there something else that I should be doing here to convert it before
passing it to MongoCollectionSave or is MongoCollectionSave supposed to
handle all of this?
Thanks!
Ben
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en