I have an xmlstarlet command that looks like this:
xml sel -T-t -m /xml/path -v "concat(name,','value,',')" -n filename.xml > output.csv
It outputs like so
#output.csv
name,value,
name,value,
name,value,
I want it to look like
name,name,name,
value,value,value,
I have been focused on trying different combinations within concat:
"concat(name,'<p>'value,',')"
"concat(name,'<br />'value,',')"
"concat(name,'"<p>"'value,',')"
"concat(name,'\n'value,',')"
Am I looking at the completely wrong area?
The route I ended up taking was using a macro that transposed 8 rows into columns, within excel.
Well, your concat statement explicitly concatenates names and values. It seems what you want to do is loop over the elements twice, selecting first the names and then the values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With