Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Applications that read XML files? >Thread Next - Re: Applications that read XML files? Re: Applications that read XML files?To: NULL Date: 4/9/2009 11:41:00 AM In article <49ddd9dc$0$90276$14726298@n...>, mlt <asdf@a...> wrote: >Are there any applications that reads an XML file and let the user specify >(using eg. XPath) how the output should be generated and writes this to eg. >a text file? LT-XML 2 (http://www.ltg.ed.ac.uk/software/ltxml2) includes lxprintf which can be used for simple tasks of this kind. Here's an example from the manual page: <products> <product price="3">Chicken</product> <product price="11.50">Lobster</product> <product price=".20">Apple</product> <product price="1.09">Milk (2 litres)</product> </products> lxprintf -e product "%-20s $%5.2f\n" . @price <prices.xml Print a list of products and their prices. The product name will be padded to appear at the left of a 20-character field, and the price will be padded to appear at the right of a 5-character field. The output is: Chicken $ 3.00 Lobster $11.50 Apple $ 0.20 Milk (2 litres) $ 1.09 -- Richard -- Please remember to mention me / in tapes you leave behind. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
