Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Simple way to go from xml to simple text format (fop -txt ?)

From: "mathieu" <mathieu.malaterre@-----.--->
To: NULL
Date: 1/6/2007 2:19:00 PM


mathieu wrote:
> Bjoern Hoehrmann wrote:
> > * mathieu wrote in comp.text.xml:
> > >  I have the following xml file:
> > >
> > ><Elements>
> > >  <Element>
> > >    <A>1235</A>
> > >    <B>Hello</B>
> > >  </Element>
> > >  ...
> > ></Elements>
> > >
> > >I would like to produce a text file containing each Element per line
> > >(xml element being separated let say by a whitespace).
> > >
> > >$ cat out.txt
> > >12345 Hello
> > >...
> > >
> > >  The correct solution would be to use fop and write an xsl document,
> > >right ? Thanks for pointer to 'Hello World' example.
> >
> > XSLT would probably be a simple solution, yes. Note though that Apache
> > FOP is a XSL Formatting Objects Processor, it's useful if you want to
> > make complex graphical layouts, not for plain text. For XSLT tutorials,
> > try a search engine of your choice.
>
> Thanks Bj=F6rn this is really helpful. Unfortunately there is very
> little help on the web when it come to outputing text file. So far I
> have (*). But the command using fop does not output anything:
>
>  $ fop -xml dummy.xml -xsl dummy.xsl -txt out.txt

Nevermind xsltproc worked out of the box, I'll use this tool instead.

  $ xsltproc dummy.xsl dummy.xml

Sorry for the noise,
Mathieu



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent