I want to get an attribute out of a XML-Tree. Therefor I use the command xpath from package libxml-xpath-perl. I figured out this command:
virsh dumpxml save | xpath -e "/domain/devices/disk[@type='file']/source/@file[1]"
This gives me
file="/var/lib/libvirt/images/save.raw"
How can I select the value only? (/var/lib/libvirt/images/save.raw)
Thanks
falstaff