xml to html with c# Help Please
-
Hello All, I am having issues trying to convert XML to HTML using C#. I have done this before using simple style sheets and simple xml documents. I now have to do this on a larger scale. The current issue is that I get an XsltException stating 'matches()' is an unknown XSLT function. This exception is thrown on the xslCompiledTransform.transfrom call. Is this a standard function? If so how do I use it? If anyone can help me with this I would greatly appreciate it. My code snippet. String outputFile = outputFileTextBox.Text; XmlUrlResolver resolver = new XmlUrlResolver(); XslCompiledTransform tran = new XslCompiledTransform(true); tran.Load(new XPathDocument(xsltFileTextBox.Text), XsltSettings.Default, resolver); tran.Transform(xmlInTextBox.Text, outputFile); Thanks in advance for all the help. Phillippio
-
Hello All, I am having issues trying to convert XML to HTML using C#. I have done this before using simple style sheets and simple xml documents. I now have to do this on a larger scale. The current issue is that I get an XsltException stating 'matches()' is an unknown XSLT function. This exception is thrown on the xslCompiledTransform.transfrom call. Is this a standard function? If so how do I use it? If anyone can help me with this I would greatly appreciate it. My code snippet. String outputFile = outputFileTextBox.Text; XmlUrlResolver resolver = new XmlUrlResolver(); XslCompiledTransform tran = new XslCompiledTransform(true); tran.Load(new XPathDocument(xsltFileTextBox.Text), XsltSettings.Default, resolver); tran.Transform(xmlInTextBox.Text, outputFile); Thanks in advance for all the help. Phillippio
matches()
is a XPath 2.0 function and .NET 2.0 does not support that version of XPath. However, you can obtain XSLT 2.0 and XPath 2.0 for .NET 2.0 from the following web sites: http://saxon.sourceforge.net/[^] and http://www.altova.com/components_processors.html[^]. George"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
matches()
is a XPath 2.0 function and .NET 2.0 does not support that version of XPath. However, you can obtain XSLT 2.0 and XPath 2.0 for .NET 2.0 from the following web sites: http://saxon.sourceforge.net/[^] and http://www.altova.com/components_processors.html[^]. George"We make a living by what we get, we make a life by what we give." --Winston Churchill
George, Thank you very much for this information. It is very helpful. Have you every used either of these 2 with c#? Thanks Again Phillippio
-
George, Thank you very much for this information. It is very helpful. Have you every used either of these 2 with c#? Thanks Again Phillippio
Actually, I only use C# when I have too. I do most of my programming in C++/CLI, and I have used both in C++/CLI.
"We make a living by what we get, we make a life by what we give." --Winston Churchill