DankaShine
13 Feb 2006, 03:18 PM
I'm using XMLStarlet to parse information from an XML file into a CSV file. I'm wondering how one would indicate that, when there are multiple occurrences of a composite, the elements from within each that I want info extracted from, should show up for each occurrence of the composite?
Currently, XMLStarlet only takes the last of the composites when there are multiples of the same. Can anyone point it out?
An example of my code is below:
Xml sel -T -t -m //Product -v "concat(RecordReference,'|',ProductIdentifier/IDValue,'|',ProductForm)" -n IPSRef.xml >results.csv
(ex: ProductIdentifier is an optionally repeatable composite.)
Currently, XMLStarlet only takes the last of the composites when there are multiples of the same. Can anyone point it out?
An example of my code is below:
Xml sel -T -t -m //Product -v "concat(RecordReference,'|',ProductIdentifier/IDValue,'|',ProductForm)" -n IPSRef.xml >results.csv
(ex: ProductIdentifier is an optionally repeatable composite.)