Show results of transformation

  • Thread starter Thread starter Mark Goldin
  • Start date Start date
M

Mark Goldin

I need to show results of transformation on the server.
Thansformation returns an attribute based xml string.
Can I bind DataRepeater to the xml string?

Thanks
 
Hi,

you would need to load the XML into DataSet and bind the Repeater to it.
Does this work, depends of suitability of the XML (to be loaded to DataSet).
 
Can you show a sample of doing that?
Thanks

Teemu Keiski said:
Hi,

you would need to load the XML into DataSet and bind the Repeater to it.
Does this work, depends of suitability of the XML (to be loaded to DataSet).
 
Hi,

You have the XML as string, so load it into System.IO.StringReader and pass
that to the ReadXml method of DataSet (ReadXml does take a string, but
that's for file name if XML is in physical file). You need also to provide
the readmode (XmlReadMode enum) value for the method if you want to specify
explicityl how handle reading schema from the XML (probably there's no
such).

Dim xml As String="<?xml...."
Dim sreader As New System.IO.StringReader(xml)
ds.ReadXml(sreader)

That should do it.

-
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
 
Back
Top