-
Using XMLStarlet to Print Contents of Multiple Elements/Composites
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.)
|| t · creative ||
"The public is more familiar with bad design than good design. It is, in effect, conditioned to prefer bad design, because that is what it lives with. The new becomes threatening, the old reassuring."
- Paul Rand
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules