in reply to XML::Simple: list all element attributes
open file.xml ; for //node { $depth = count(ancestor::*) - 1 ; echo :s { ' ' x $depth } @name ': ' @text ; } [download]