title: How to convert cursor object to XML or JSON in android
body: <p>Is there any libraries are available to convert Cursor object to direct XML or JSON .</p>
  
  <p>For example , we have a table with two columns id,name. When i get cursor object from DB. With out looping cursor i want to convert it into </p>
  
  <pre><code>&lt;XML&gt;
  &lt;id&gt;1&lt;id&gt;
  &lt;name&gt;xyz&lt;/name&gt;
  &lt;/XML&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>