rrichards               Tue Jul  8 13:00:49 2003 EDT

  Modified files:              
    /php-src/ext/dom    element.c 
  Log:
  fix getElementsByTagName
  
Index: php-src/ext/dom/element.c
diff -u php-src/ext/dom/element.c:1.6 php-src/ext/dom/element.c:1.7
--- php-src/ext/dom/element.c:1.6       Mon Jul  7 15:37:32 2003
+++ php-src/ext/dom/element.c   Tue Jul  8 13:00:49 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: element.c,v 1.6 2003/07/07 19:37:32 rrichards Exp $ */
+/* $Id: element.c,v 1.7 2003/07/08 17:00:49 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -387,11 +387,12 @@
        ctxp = xmlXPathNewContext(docp);
 
        ctxp->node = nodep;
-       str = (char*) emalloc((name_len+3) * sizeof(char)) ;
-       sprintf(str ,"//%s",name);
+       str = (char*) emalloc((name_len+13) * sizeof(char)) ;
+       sprintf(str ,"descendant::%s",name);
 
        xpathobjp = xmlXPathEval(str, ctxp);
        efree(str);
+       ctxp->node = NULL;
 
        if (!xpathobjp) {
                RETURN_FALSE;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to