JSON is another serialization format, not an "Object", so I dont think it helps the author much.
OTOH the author was asking for an "object" that could be reused between C++ and Java ... which is a very tough call unless your going to write JNI code. My opinion would be to stick to text XML until you read it into your language of choice, then use whatever XML-Object mapping technology you like within that language. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Danny Sokolsky Sent: Thursday, July 02, 2009 11:59 AM To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] xml to object Another thought is to use JSON, which is relatively generic. There are new built-ins in 4.1 to serialize to JSON and parse from JSON -- xdmp:to-json and xdmp:from-json. I'm not sure how much support there is to go from JSON to other languages, but it is a pretty generic format so it seems doable. -Danny -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Eric Palmitesta Sent: Thursday, July 02, 2009 8:50 AM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] xml to object XStream (http://xstream.codehaus.org) is a nice xml <-> java object converter, if you're working on the java side. Seems as though their website is down right this second, though... Eric Paul M wrote: > Hi All: > > Though usually not recommended, if I were required to take XML from a > MarkLogic Repository and convert it to an object within Java, what would > be the best approach if: > > The XML snippet being returned from ML follows a specific known schema. > (I believe there are some tools available?) > The XML snippet contains multiple objects > <books><book rec="1"><title>hi</title></book></books> > The fastest method to ingest an XML snippet to Java object (vs the most > usable or vs some other metric.) > > P.S. What if I wanted a generic object that can be used by multiple > systems (java, c++, etc) > > How have you accomplished similar tasks? > > > > ------------------------------------------------------------------------ > > _______________________________________________ > General mailing list > [email protected] > http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
