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. Output to text file

Output to text file

Scheduled Pinned Locked Moved XML / XSL
xmlquestion
3 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.
  • S Offline
    S Offline
    shortdog
    wrote on last edited by
    #1

    I am new to XML. I have tried to search for an answer to this question but haven't found any good answers. I have created an XSD that describes a programming language (in this case C). I have created a simple XML file that describes a simplistic hello world type program. I have created a XSLT file that will transform that XML file into a c program. What I would like to do is transform the XML and save the output a text or more specifically my .c file. Then I should be able to create another XSLT that would generate my .h file. <xsl:output method="text" /> in my XSLT file. When I load the XML file in IExplorer, the output is text on the screen, and I can copy and paste the text into a text file, but when I save as in IE it saves the original untransformed XML. Is there a way to save the transformed output? Do I need to transform it outside of a browser somehow?

    L 1 Reply Last reply
    0
    • S shortdog

      I am new to XML. I have tried to search for an answer to this question but haven't found any good answers. I have created an XSD that describes a programming language (in this case C). I have created a simple XML file that describes a simplistic hello world type program. I have created a XSLT file that will transform that XML file into a c program. What I would like to do is transform the XML and save the output a text or more specifically my .c file. Then I should be able to create another XSLT that would generate my .h file. <xsl:output method="text" /> in my XSLT file. When I load the XML file in IExplorer, the output is text on the screen, and I can copy and paste the text into a text file, but when I save as in IE it saves the original untransformed XML. Is there a way to save the transformed output? Do I need to transform it outside of a browser somehow?

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      shortdog wrote:

      Do I need to transform it outside of a browser somehow?

      Copy/Paste from the browser might work. Otherwise you can do a transform to a file using a XSLT utility or tool, or you might build one yourself. In most languages that have access to an XML library it takes about 5 lines of code to build a XSLT command line program.

      S 1 Reply Last reply
      0
      • L led mike

        shortdog wrote:

        Do I need to transform it outside of a browser somehow?

        Copy/Paste from the browser might work. Otherwise you can do a transform to a file using a XSLT utility or tool, or you might build one yourself. In most languages that have access to an XML library it takes about 5 lines of code to build a XSLT command line program.

        S Offline
        S Offline
        shortdog
        wrote on last edited by
        #3

        Thanks, I was making this harder than it needed to be. A simple 2 line C# program was all I needed.

        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