midge25
Programmer
- Jul 19, 2002
- 9
Hi,
I have a large xml file which looks as follows:
<title id="T6352">
<en>Power Distribution</en>
<es>Distribución de alimentación</es>
<el>??a??µ? ?s????</el>
<cs>Usporádání elektrického napájení</cs>
<de>Stromverteilung</de>
<fi>Virranjako</fi>
<fr>Distribution d’alimentation</fr>
<hu>Áramelosztás</hu>
<it>Distribuzione di alimentazione elettrica</it>
<ja>???????????????</ja>
<nl>Spanningsverdeling</nl>
<no>Strømfordeling</no>
<pl>Dystrybucja zasilania</pl>
<ru>????????????? ?????????????? ???????</ru>
<tr>Güç Dagitimi</tr>
<sv>Spänningsfördelning</sv>
<pt>Distribuição de corrente</pt>
<da>Strømfordeling</da>
</title>
I wish to extract the data and output it to a table format as follows:
Title en es el cs de fi …….. sv pt da
I’m quite new to awk and know that I would have to use associative arrays.. (that’s what I’ve read)….
I have a large xml file which looks as follows:
<title id="T6352">
<en>Power Distribution</en>
<es>Distribución de alimentación</es>
<el>??a??µ? ?s????</el>
<cs>Usporádání elektrického napájení</cs>
<de>Stromverteilung</de>
<fi>Virranjako</fi>
<fr>Distribution d’alimentation</fr>
<hu>Áramelosztás</hu>
<it>Distribuzione di alimentazione elettrica</it>
<ja>???????????????</ja>
<nl>Spanningsverdeling</nl>
<no>Strømfordeling</no>
<pl>Dystrybucja zasilania</pl>
<ru>????????????? ?????????????? ???????</ru>
<tr>Güç Dagitimi</tr>
<sv>Spänningsfördelning</sv>
<pt>Distribuição de corrente</pt>
<da>Strømfordeling</da>
</title>
I wish to extract the data and output it to a table format as follows:
Title en es el cs de fi …….. sv pt da
I’m quite new to awk and know that I would have to use associative arrays.. (that’s what I’ve read)….