in reply to Having problems accessing individual attributes in xml

You might also be interested in XML::XSH2.
open 866457.xml ; for //ncp_file { echo :n @md5 ' ' ; for ancestor::ncp_directory/@name echo :s :n (.) '/' ; echo @name ; }