Skip to main content

You can add multiple conditions:

xmlstarlet sel -t -m "//item[@id='cover'][starts-with(@media-type,'image/')]" -v '@href' -nl file.xml

You can add multiple conditions:

xmlstarlet sel -t -m "//item[@id='cover'][starts-with(@media-type,'image/')]" -v '@href'

You can add multiple conditions:

xmlstarlet sel -t -m "//item[@id='cover'][starts-with(@media-type,'image/')]" -v '@href' -nl file.xml
Source Link
Chris Davies
  • 128k
  • 16
  • 178
  • 323

You can add multiple conditions:

xmlstarlet sel -t -m "//item[@id='cover'][starts-with(@media-type,'image/')]" -v '@href'