Given:
<UOIS UOI_ID="9c168282a881848971a85eaa32e7f213f7791e88" CONTENT_TYPE="VIDEO" NAME="2016_129_17_1_PM_Moss.mov" VERSION="1">
How can I use xmlstarlet to pull the values for UOI_ID
and NAME
?
The following should output UOI_ID
and NAME
, from every UOIS
element, separated by comma :
xmlstarlet sel -t -m "//UOIS" -v "concat(@UOI_ID, ', ' , @NAME)" -n your_xml.xml