Thanks for reply, I never used LibXML, do you think it would work faster?
I have to say with the full path for //pair ( /e-c/pair instead of //pair), it did not help for speed.
Moreover since it's pair I have to extract it in to different process, as it is in my code.
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.