Howdy,
What is the best way to take a populated TypedView class and serialize it to XML?
The following works fine if you've got a typed DataSet which matches the view:
Dim objDS As New Inventory_TieredPricing
For Each objRow As DataRow In objV.Rows
objDS.Inventory_TieredPrice.ImportRow(objRow)
Next
objDoc.InnerXml = objDS.GetXml()
Return objDoc
However, I'd much rather have code like this:
objDoc.InnerXML = objV.ToXml()
That ToXml() method would simply take what was in the typed view and turn it into an XML structure like:
<ViewName>
<Column1>value</Column1>
<Column2>value</Column2>
etc
</ViewName>
I can do this with programming pretty easily, but I waiting to see if it already existing before I did it.
Thanks for any help,
Matt