Re: [xml] transformation of any format in xml

On 15/10/2006, at 12:32 AM, Sema wrote:


I know that we can use XSLT to transform a data flow from XML to any other format. But how can I transform NON-XML to XML? XSLT does not function in
that case.


I have written a command line program for converting any structured text into xml, it takes an xml file contain instructions on how to use regular expression to generate XML, I use it to take source code comments use it to generate XML, like JavaDoc, AutoDoc, HeaderDoc, etc, though it is much more generic than that. I initially developed it in Objective-C, but I am in the process of rewriting it in C++ using libxml so it will be portable and plan to make it public.

This is an example of a xml document used to process, tab separated values.

<ftx:translator root-template="document" version="1.0" xmlns:ftx="";>
        <ftx:template name="document">
                        <file-name href="$file-url">
                                <ftx:text select="$file-name"/>
                        <ftx:match pattern="^.+$">
                                <ftx:call-template name="row" select="$0"/>
<ftx:comment>Generated from the source <ftx:text select="$0"/></ ftx:comment>
        <ftx:template name="row">
                        <ftx:match select="$0" pattern="[^\t]+">
                                        <ftx:text select="$0"/>

View this message in context: of-any-format-in-xml-tf2442851.html#a6811185 Sent from the Gnome - Lib - Xml - General mailing list archive at

xml mailing list, project page
xml gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]