|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
XML/XSL transform problemI was trying to do this example shown here: http://samples.gotdotnet.com/quickstart/util/srcview.aspx?path=/quickstart/aspplus/samples/webforms/ctrlref/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; } 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. -- Show quoteHide quoteSincerely, S. Justin Gengo, MCP Web Developer / Programmer www.aboutfortunate.com "Out of chaos comes order." Nietzsche "Lasse Edsvik" <lasse@nospam.com> wrote in message news:ep6AdQa8FHA.2716@TK2MSFTNGP11.phx.gbl... > Hello > > I was trying to do this example shown here: > > http://samples.gotdotnet.com/quickstart/util/srcview.aspx?path=/quickstart/aspplus/samples/webforms/ctrlref/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; > > } > >
Other interesting topics
How to add a small HTML table under a row of a GridView
run asp.net without a web server Visual Web Developer Express How do I build Code-behind into DLL in bin folder Source Control Products??? Downloading file from database Problem Running ASP.NET/ASP App Under VS 2005 A translatable website ASP classic -> ASP.NET 2.0 Cannot display Chinese data from database specifying a query string in an href dynamically |
|||||||||||||||||||||||