diff -Naur a/debugXML.c b/debugXML.c
--- a/debugXML.c	2014-05-09 10:19:49.000000000 +0530
+++ b/debugXML.c	2014-06-17 15:57:09.000000000 +0530
@@ -3244,6 +3244,8 @@
             } else {
 #ifdef LIBXML_XPATH_ENABLED
                 ctxt->pctxt->node = ctxt->node;
+		if (arg[strlen(arg)-1] == '/')
+		    arg[strlen(arg)-1] = '\0';
                 list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
 #else
                 list = NULL;
