cvs: php4 /ext/domxml php_domxml.c

From: Date: Wed, 13 Mar 2002 08:08:22 +0000
Subject: cvs: php4 /ext/domxml php_domxml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10056@lists.php.net to get a copy of this message
chregu Wed Mar 13 03:08:22 2002 EDT Modified files: /php4/ext/domxml php_domxml.c Log: Return attribute name in node_name(), if it's a XML_ATTRIBUTE_NODE Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.128 php4/ext/domxml/php_domxml.c:1.129 --- php4/ext/domxml/php_domxml.c:1.128 Wed Mar 13 02:31:16 2002 +++ php4/ext/domxml/php_domxml.c Wed Mar 13 03:08:22 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.c,v 1.128 2002/03/13 07:31:16 chregu Exp $ */ +/* $Id: php_domxml.c,v 1.129 2002/03/13 08:08:22 chregu Exp $ */ /* TODO * - Support Notation Nodes @@ -1316,7 +1316,10 @@ /* {{{ Methods of Class DomAttribute */ /* {{{ proto array domxml_attr_name(void) - Returns list of attribute names */ + Returns list of attribute names + Notice: domxml_node_name() does exactly the same for attribute-nodes, + is this function here still needed, or would an alias be enough? + */ PHP_FUNCTION(domxml_attr_name) { zval *id; @@ -1463,6 +1466,10 @@ case XML_TEXT_NODE: str = "#text"; + break; + + case XML_ATTRIBUTE_NODE: + str = n->name; break; case XML_CDATA_SECTION_NODE:

« previous php.cvs (#10056) next »