in reply to finding each and every node of a xml document

Using XML::XSH2, which is a wrapper around XML::LibXML:
for (//* | //@* | //comment() | //text() | //processing-instruction()) + ls . ;