Re: [mongodb-user] Xml String into MongoDB using JavaDriver

30 views
Skip to first unread message

Sam Millman

unread,
Sep 11, 2012, 10:34:46 AM9/11/12
to mongod...@googlegroups.com
You can store it....as a string.

I am not sure what you mean by "direct". What do you mena by that?

On 11 September 2012 14:32, Sam <samanth...@gmail.com> wrote:
Hi,

I have an xml string and want to store it in MongoDB. Please let me know if there is any direct way.

Xml String:

"<leadScoreTemplate tacticalName="default">

                                        

                                         <param name="leadAge"  type="number_range">

                                                <qualifier min="0" max="30" value="[0,30d]" weight="10"/>

                                                <qualifier min="31" max="60" value="[31,60d]" weight="5"/>

                                         </param>

                                        

                                         <param name="leadSource" type="string" >

                                                <qualifier value="Web Inquiry" weight="10"/>

                                                <qualifier value="Cold Call" weight="10"/>

                                         </param>

                                        

                                         <param name="isExisting" type="string" >

                                                <qualifier   value="Y" weight="10"/>

                                         </param>

                                        

                                         <param name="isTop" type="string" >

                                                <qualifier  value="Y" weight="10"/>

                                         </param>     

                                        

                                         <param name="isLoyal" type="string" >

                                                <qualifier value="Y" weight="10"/>

                                         </param>     

                                        

                                  </leadScoreTemplate>"


Regards,
Sam

--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

Russell Bateman

unread,
Sep 11, 2012, 10:56:23 AM9/11/12
to mongod...@googlegroups.com
Or maybe you mean to store it in a collection as a document? I haven't been quite all the way around the block in Mongo yet, I'm only a Java guy, but I'm guessing you just pick your language driver and render the relationships appropriately. Maybe your XML is represented in your code as an entity (class) and use an ORM like Morphia.

Do you really know what you want to do? Or are you just saying you work in XML while Mongo seems to be all about JSON?
Reply all
Reply to author
Forward
0 new messages