I have this in a file:
I didn't write this code, it's part of the IE web controls source, and I have to compile this. However, when I try to compile it, I get this:PHP Code:internal XmlTextReader GetXmlReaderFromXPathDoc(XPathDocument xmldoc, string TreeNodeXsltSrc)
{
// Load TreeNodeXsltSrc into XslTransform
XslTransform xslTrans = new XslTransform();
Uri uri = new Uri(Page.Request.Url, TreeNodeXsltSrc);
xslTrans.Load(uri.AbsoluteUri);
// Do transform
MemoryStream stream = new MemoryStream();
xslTrans.Transform(((IXPathNavigable)xmldoc).CreateNavigator(), null, stream);
stream.Position = 0;
return new XmlTextReader(stream);
}
I cannot figure out how to make this code conform to the 'newer' standards. Can anyone help?'System.Xml.Xsl.XslTransform.Transform(System.Xml.XPath.XPathNavigator,
System.Xml.Xsl.XsltArgumentList, System.IO.Stream)' is obsolete: 'You
should pass XmlResolver to Transform() method'




Reply With Quote