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 ????
Printable View
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 ????
maybe if I convert the datatable to a dataset and then call the getXml method. Not very efficient though.
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:
Dim TableWriter As System.Xml.XmlTextWriter TableWriter = New System.Xml.XmlTextWriter(CurrentPath + "\XMLData\01TBLFBP.xml", Nothing) With TableWriter TblFilmBuildPrimer.WriteXml(CurrentPath + "\XMLData\01TBLFBP.xml") End With TableWriter.Flush() TableWriter.Close()