Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. xml to html with c# Help Please

xml to html with c# Help Please

Scheduled Pinned Locked Moved XML / XSL
xmlhelpquestioncsharphtml
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    phillippio
    wrote on last edited by
    #1

    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

    G 1 Reply Last reply
    0
    • P 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

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      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

      P 1 Reply Last reply
      0
      • G George L Jackson

        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

        P Offline
        P Offline
        phillippio
        wrote on last edited by
        #3

        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

        G 1 Reply Last reply
        0
        • P 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

          G Offline
          G Offline
          George L Jackson
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups