|
-
May 2nd, 2005, 07:11 AM
#1
Need help with "obsolete" code - .Transform
I have this in a file:
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 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:
'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'
I cannot figure out how to make this code conform to the 'newer' standards. Can anyone help?
-
May 3rd, 2005, 11:56 PM
#2
Re: Need help with "obsolete" code - .Transform
Thanks, that helped.
Don't know why you've been banned, but I'd like to rate you when you get back.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|