Print

Print


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 21.01.2016 um 19:39 schrieb Eric Lease Morgan:

> Your XML files are pretty flat, and  if I understand the question
> correctly, then it is all but trivial to extract your three elements
> as a line of CSV.  Consequently I suggest foregoing the concatenation
> of all the XML files into a single file. Such only adds complexity.

> # process each file
> for FILE in ./data/*.xml
> 
>  # do the work
>  $XSLTPROC  $XSLT $FILE
> 
> end

actually, if [ "$XSLTPROC" = "xsltproc" ] ;
then you can reduce that to

xsltproc $XSLT ./data/*.xml

For simple situations one might do without XSLT and stuff
XPath expressions for the content to grab into the command
line of utilities like xml_grep or xpath. But since these
are essentially shell interfaces to perl modules (XML::Xpath
and XML::Twig) it's probably not worth the effort installing
them if they are not already present in your environment.

Thomas Berger

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iJwEAQECAAYFAlahLiIACgkQYhMlmJ6W47PEIwQAnSRMS+s2lVonN6DDo6FoQLB3
p8tUPKVHLWnnkT58dH798n8Kosjo7K/klV1mQS1mj6Wof4aCGKAv7ANj1IBH0Swo
D8FkI4vPeIG/qBe+U2zWO4QV+n3CYidTrh58VwSwVQd6X5fLcwfB4qYua4F6E1pF
vckYhHTSKw04auPN+Qk=
=ENF+
-----END PGP SIGNATURE-----