in reply to Re^2: my xml xpath is too slow.
in thread my xml xpath is too slow.

XML::LibXML would certainly run much faster, XML::XPath is quite slow. and the code would be very similar. I am surprised that removing the // did not speed up the code though.