dataset to xml

Discussion in 'ASP .Net' started by helpful sql, May 25, 2005.

  1. helpful sql

    helpful sql Guest

    Hi all,
    I have a DataSet with one table that has more than one row. I need to
    programmatically generate simple xml file from it. I need to include data
    from only one row.

    Example:

    <datasetname>
    <tablename>
    <column1name>value</column1name>
    <column2name>value</column2name>
    <column3name>value</column3name>
    </tablename>
    </databasename>

    How can I do this?

    Thanks.
     
    helpful sql, May 25, 2005
    #1
    1. Advertising

  2. helpful sql

    vMike Guest

    "helpful sql" <> wrote in message
    news:%...
    > Hi all,
    > I have a DataSet with one table that has more than one row. I need to
    > programmatically generate simple xml file from it. I need to include data
    > from only one row.
    >
    > Example:
    >
    > <datasetname>
    > <tablename>
    > <column1name>value</column1name>
    > <column2name>value</column2name>
    > <column3name>value</column3name>
    > </tablename>
    > </databasename>
    >
    > How can I do this?
    >
    > Thanks.
    >

    dim ds as dataset = yourdataset
    ds.writexml("strpathandfilename"))
     
    vMike, May 25, 2005
    #2
    1. Advertising

  3. helpful sql

    vMike Guest

    "vMike" <> wrote in message
    news:Gt4le.8000$...
    >
    > "helpful sql" <> wrote in message
    > news:%...
    > > Hi all,
    > > I have a DataSet with one table that has more than one row. I need to
    > > programmatically generate simple xml file from it. I need to include

    data
    > > from only one row.
    > >
    > > Example:
    > >
    > > <datasetname>
    > > <tablename>
    > > <column1name>value</column1name>
    > > <column2name>value</column2name>
    > > <column3name>value</column3name>
    > > </tablename>
    > > </databasename>
    > >
    > > How can I do this?
    > >
    > > Thanks.
    > >

    > dim ds as dataset = yourdataset
    > ds.writexml("strpathandfilename"))
    >

    for one row you would need to get table(0) of the dataset and do a select
    first.
     
    vMike, May 25, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nedu N
    Replies:
    1
    Views:
    1,802
    Chris Taylor
    Oct 31, 2003
  2. JimO

    DataSet and dataSet

    JimO, Mar 1, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    526
    Mary Chipman [MSFT]
    Mar 8, 2006
  3. Joseph D. DeJohn

    DataSet to DataSet

    Joseph D. DeJohn, Aug 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    401
  4. Replies:
    0
    Views:
    437
  5. ringo
    Replies:
    0
    Views:
    174
    ringo
    Aug 18, 2004
Loading...

Share This Page