XML/XSL transform problem

L

Lasse Edsvik

Hello

I was trying to do this example shown here:

http://samples.gotdotnet.com/quicks...webctrl/Xml/Xml2.src&file=CS\Xml2.aspx&font=3

When I run it I get 3 warnings and nothing shows in the browser, what might
be wrong?

Warning 1 'System.Xml.Xsl.XslTransform' is obsolete: 'This class has been
deprecated. Please use System.Xml.Xsl.XslCompiledTransform instead.
http://go.microsoft.com/fwlink/?linkid=14202' C:\Documents and
Settings\Administrator\My Documents\Visual
Studio\WebSites\XMLTest\Default.aspx.cs 20 9 C:\...\XMLTest\


Warning 2 'System.Xml.Xsl.XslTransform' is obsolete: 'This class has been
deprecated. Please use System.Xml.Xsl.XslCompiledTransform instead.
http://go.microsoft.com/fwlink/?linkid=14202' C:\Documents and
Settings\Administrator\My Documents\Visual
Studio\WebSites\XMLTest\Default.aspx.cs 20 34 C:\...\XMLTest\


Warning 3 'System.Web.UI.WebControls.Xml.Document' is obsolete: 'The
recommended alternative is the XPathNavigator property. Create a
System.Xml.XPath.XPathDocument and call CreateNavigator() to create an
XPathNavigator. http://go.microsoft.com/fwlink/?linkid=14202' C:\Documents
and Settings\Administrator\My Documents\Visual
Studio\WebSites\XMLTest\Default.aspx.cs 23 9 C:\...\XMLTest\


protected void Page_Load(object sender, EventArgs e)

{

XmlDocument doc = new XmlDocument();

doc.Load(Server.MapPath("people.xml"));

XslTransform trans = new XslTransform();

trans.Load(Server.MapPath("peopletable.xsl"));

xml1.Document = doc;

xml1.Transform = trans;

}
 
S

S. Justin Gengo

Lasse,

The warnings you have received mean that those classes which existed in .NET
1.1 are no longer being used in .NET 2.0. They are easy to fix simply
replace the classes in question with the classes the warning tells you to
use instead.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top