XML to formated text file using XSL


XML & Web services: XML to formated text file using XSL

  1. XML to formated text file using XSL (3 messages)


    I want to convert a Xml file to a text(flat) file), the text file has fixed format. How can i use XSL to achive this.

  2. Unfortunately you haven't describes exactly what format is required. There are many processers available....see apaches's Xalan.....they have Java, C, perl implementations. Essentially you search for elements and apply formatting templates - check out O'reilly's XML pocket reference for a quick lesson and visit ww.w3c.org
  3. XML file is itself a TEXT file. Only that it is saved with a .XML extension. so i don't get your point there. Could you be more specific? contact me at : vadali_v at 123india dot com
  4. You could do it in a couple of ways.
    1. Parsing throught the XML using any of the parsers available or by trditional methods of parsing thro a text file, and understanding tokens and placing them next to each other in another text file with any delimeters that you want.
    2. Write a program which will look for a file/document that describes the format of the text file you are dealing with and generates an XML out of the text file. This is more elegant, because it gives you the flexibility of converting flatfiles, XML in to one another. Once the program is written, all one needs to do is creating/manipulating the format file(.xfl) to deal with different flat files.
    Check the following site out.
    May be you can use it/buy it or get an idea of what you ned to do in your program