Results 1 to 3 of 3

Thread: dataset and the getXml method

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2005
    Posts
    180

    dataset and the getXml method

    I have a datatable that I would like to output to a xml file. I would like to do something similiar to the dataset - getXml method. Is this possible ????

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Dec 2005
    Posts
    180

    Re: dataset and the getXml method

    maybe if I convert the datatable to a dataset and then call the getXml method. Not very efficient though.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2005
    Posts
    180

    Re: dataset and the getXml method

    Ok I decided that it would be simpler to use the writeXml method and to create a seperate xml file for the table. (The program I have generates xml files based on data that has been entered and then performs xslt transformations). However at runtime I get this error "datatable cannot be serialized, datatable name not set" here is my code:

    VB Code:
    1. Dim TableWriter As System.Xml.XmlTextWriter
    2.         TableWriter = New System.Xml.XmlTextWriter(CurrentPath + "\XMLData\01TBLFBP.xml", Nothing)
    3.         With TableWriter
    4.             TblFilmBuildPrimer.WriteXml(CurrentPath + "\XMLData\01TBLFBP.xml")
    5.         End With
    6.  
    7.         TableWriter.Flush()
    8.         TableWriter.Close()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width