How to convert a JDBC Result Set into Xml File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • santhoskumara
    New Member
    • Jul 2007
    • 8

    #1

    How to convert a JDBC Result Set into Xml File

    I want to develop a doubl combo boxes using Ajax, I am having Result Set Object. How will convert the values in the ResultSet into Xml File.

    Whether I need to create separate XML Mapping File for getting the values from ResultSet into XML File

    Kindly advice me.

    With Regards
    A.Santhosh Kumar
  • jeffbroodwar
    New Member
    • Oct 2006
    • 118

    #2
    Hi,

    Please follow this link.... it has all the answers you need :

    http://www.developer.c om/db/article.php/10920_3329001_2

    Hope this helps... ^^

    Kind Regards,
    Jeff

    Comment

    • sumittyagi
      Recognized Expert New Member
      • Mar 2007
      • 202

      #3
      Originally posted by santhoskumara
      I want to develop a doubl combo boxes using Ajax, I am having Result Set Object. How will convert the values in the ResultSet into Xml File.

      Whether I need to create separate XML Mapping File for getting the values from ResultSet into XML File

      Kindly advice me.

      With Regards
      A.Santhosh Kumar
      Simply convert your data into xml string. Write the string to the response stream, and set the content-type header as text/xml, and content-length header as length of string.

      at client side (probably in responseHandler function defined by you), get the xml from request obect by simply calling responsexml variable (please confirm the case of letters in word, I am not able to recall that, it could be either responseXml or responseXML). and you are having the xml object at client side, do whatever you want to do with it.

      Comment

      Working...