xml problem

  • <root>

    <row  txtname="BHAVNA JHAVERI "  txtdob="13-Nov-1950"  nomname="sdfs"  nomadd="fsdfs"  ></row>

    <row  txtname="aminJHAVERI "  txtdob="13-Nov-1970"  nomname="sdddfs"  nomadd="fxxsdfs"  ></row>

    <row  txtname="aminJRI "  txtdob="13-Nov-1980"  nomname="sdddfs"  nomadd="fxxsdfs"  ></row></root>

     

    i have xml , which has  a data in row format,

    i want to extract data from such a xml and create a xml in a node format like this

    <root>

    <txtname>Bhavna Jhaveri</txtname>

    <txtdob>13-nov1950</txtdob>

    <nomname>sdfs</nomname>

    <nomadd>fsdfs</nomadd>

    </root>

    now how can i do this ?

    pls help

     

     

     

     

     

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • If you are just selecting data from an sql server table and want to output it in XML format, try this:

    SELECT

    txtname

    ,txtdob

    ,nomname

    ,nomadd

    FROM myTable as root

    FOR XML AUTO,ELEMENTS

  • no dude,

    iam extracting data from an xml file, which has a format in the above mentioned format.

    after extracting data from it , iam goind to create an xml string.

    with those sub elements and insert a tables column.

    thats why i posted this question here

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • Dude?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply