Hi Azam,

 

Sample code:

========================================

import com.marklogic.xcc.*;

import java.net.*;

 

//Setup a connection to Mark Logic XDBC server

URI serverUri = new URI ("xcc://" + 

                                                  userName + ":" + 

                                                  pass + "@" + 

                                                  serverIP + ":" + 

                                                  port);

ContentSource cs = ContentSourceFactory.newContentSource(serverUri);

Session session = cs.newSession();

 

//Execute XQuery

String strQuery="<Any XQuery>";

Request request = m_objConnectionSession.newAdhocQuery (strQuery);

ResultSequence rs= session.submitRequest(request);

 

//Retrieve Output of XQuery

String xmlOutput;

if (rs.hasNext()) 

{

                ResultItem item = rs.next();

                xmlOutput = item.asInputStream();

}

 

//Print XML

System.out.println(xmlOutput);

=====================================

 

Regards.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Azam
Sent: Monday, November 24, 2008 6:29 PM
To: [email protected]
Subject: [MarkLogic Dev General] XQuery and Mark Logic Sever

 

Hi,

 

I have loaded the Xml document in Mark Logic server using the XCC demo
application.

 

The main task I need to complete is ,

 I have to pull the content from the Xml document which I have loaded into
Mark Login server at a particular node using XQUERY and XCC.

As iam very new to XQUERY.

Could you please send me the process or the sample code for the above task.

 

 

Its very urgent.

I will be very helpful to you if I through with my task.

 

 

Thanks in Advance.

 

 

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to