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