views:

144

answers:

1

I have a System.Web.UI.WebControls.Xml control (Xml1) in a webforms app that I have upgraded from .NET 2.0 to .NET 4.0

I am getting two warnings from the code-behind page that I'd like to do something about.

... 
Dim ds As DataSet = app.GetObjects
Dim xmlDoc As New System.Xml.XmlDataDocument(ds)
Xml1.Document = xmlDoc
Xml1.TransformSource = "~/xslt/admin_objectslist.xslt"
...

From the second line I get the warning:

'System.Xml.XmlDataDocument' is obsolete: 'XmlDataDocument class will be removed in a future release.'.

And from the third line I get the warning:

'Public Property Document As System.Xml.XmlDocument' is obsolete: 'The recommended alternative is the XPathNavigator property. Create a System.Xml.XPath.XPathDocument and call CreateNavigator() to create an XPathNavigator.

What is the recommended .NET 4.0 replacement for this?