function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to generate XML file with QueryResult ?



       Is there any way to generate XML file with the QueryResult object?




Message Edited by bdr_09 on 01-27-2010 02:11 AM

When you create a Query to invoke on sforce, the query automatically is an XML document. Meaning when result is returned in a form of ResponseDocument, you automatically have an XML document.


for example:


//-->This is an XML doument

QueryResponseDocument queryResponseDocument = $scon.stub.query( queryDocument, $scon.sessionHeaderDocument, null, null, null);


//-->Therefore you can print to view the content or Pipe it to a file



//-->The actual response it also an XML file therefore you can system print to view its output

//-->or pipe it to a file on your local/remote disc

QueryResponse queryResponse = queryResponseDocument.getQueryResponse();



//--> Print the actual query result

QueryResult queryResult = queryResponse.getResult();