The Java XCC classes know about W3C DOM objects (org.w3c.dom.Node). I have only dabbled in Scala, but http://stackoverflow.com/questions/3922151/scala-convert-org-w3c-dom-document-to-scala-xml-nodeseq seems to cover the conversion to Scala NodeSeq.
http://docs.marklogic.com/guide/java/intro#chapter is a good place to get started, and http://docs.marklogic.com/guide/xcc has more. The javadoc overview at http://docs.marklogic.com/javadoc/xcc/overview-summary.html and the http://docs.marklogic.com/javadoc/xcc/com/marklogic/xcc/types/XdmNode.html#asW3cNode() docs might help too. -- Mike On 18 Oct 2012, at 13:04 , David Sargeant <da...@dsargeant.com> wrote: > In Scala I can do the following (examples from a REPL session): > > scala> val david = > <person><name>David</name><occupation>developer</occupation></person> > david: scala.xml.Elem = > <person><name>David</name><occupation>developer</occupation></person> > > scala> (david \ "name").text > res3: String = David > > I'm wondering how to query MarkLogic using XCC and transform the results into > a scala.xml.Elem object so I can easily query the xml or map over it. See > the following slides for some more things you can do with xml in Scala - > http://www.dzone.com/links/r/xml_processing_in_scala.html. > > > David > > On Oct 18, 2012, at 3:28 PM, David Lee <david....@marklogic.com> wrote: > >> To help answer you, could you provide details ? >> What are your goals for "builtin xml processing in scala" and how does this >> relate to your intended use of MarkLogic ? >> >> >> ----------------------------------------------------------------------------- >> David Lee >> Lead Engineer >> MarkLogic Corporation >> d...@marklogic.com >> Phone: +1 812-482-5224 >> Cell: +1 812-630-7622 >> www.marklogic.com >> >> >> >> -----Original Message----- >> From: general-boun...@developer.marklogic.com >> [mailto:general-boun...@developer.marklogic.com] On Behalf Of David Sargeant >> Sent: Thursday, October 18, 2012 3:19 PM >> To: General MarkLogic Developer Discussion >> Subject: [MarkLogic Dev General] Scala and XCC >> >> I'm farily new to the world of Java/Scala and MarkLogic, so forgive me if >> the question seems trivial. I'm wondering what the best way is to use >> MarkLogic and Scala so that I can take advantage of the built-in xml >> processing capabilities of Scala? Thanks. >> >> >> David >> _______________________________________________ >> General mailing list >> General@developer.marklogic.com >> http://developer.marklogic.com/mailman/listinfo/general >> _______________________________________________ >> General mailing list >> General@developer.marklogic.com >> http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > General mailing list > General@developer.marklogic.com > http://developer.marklogic.com/mailman/listinfo/general > _______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general