You didn't provide the file "tei-epidoc.dtd". I tried your program with that line removed from the xml and it complained about mismatched tags at "</body>". The xml isn't valid.
have a look at the Perlmonks tutorial I linked to above. The "moving up from simple to libXML" is pretty good and relevant to your problem. libXML has a faster and more up to date xpath implementation.
In reply to Re^2: perl xpath extraction
by Gulliver
in thread perl xpath extraction
by lionofmasses
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |