Retrieving XML String

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lmwasisebe
    New Member
    • Feb 2007
    • 3

    #1

    Retrieving XML String

    hie guys i having problems retrieving xml values, this is the structure of the problem:

    I have a database with the following fields, 1)id 2)state 3)request. the request field contains a xml file converted to a string. the problem now is that i have to retrieve certain values from that xml string in the request field and save the in some other databse

    please assist
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by lmwasisebe
    hie guys i having problems retrieving xml values, this is the structure of the problem:

    I have a database with the following fields, 1)id 2)state 3)request. the request field contains a xml file converted to a string. the problem now is that i have to retrieve certain values from that xml string in the request field and save the in some other databse

    please assist
    Retrive the xml string into a variable called say myXML.
    After that you can do one of the following.

    a)Save that string as an XML using FileWriter, then parse that xml file using JAXP.
    b)Simply extract the fields you want from the xml string by searching through the tags of the xml and store the required fields in the database

    Comment

    Working...