]> granicus.if.org Git - php/commitdiff
Return attribute name in node_name(), if it's a XML_ATTRIBUTE_NODE
authorChristian Stocker <chregu@php.net>
Wed, 13 Mar 2002 08:08:22 +0000 (08:08 +0000)
committerChristian Stocker <chregu@php.net>
Wed, 13 Mar 2002 08:08:22 +0000 (08:08 +0000)
ext/domxml/php_domxml.c

index 5444ed24ebdad2a891562e265a365a6d572fb6ec..0963ad8ad02b19e1717a2ec38be843050779100e 100644 (file)
@@ -1316,7 +1316,10 @@ PHP_MINFO_FUNCTION(domxml)
 /* {{{ 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;
@@ -1465,6 +1468,10 @@ PHP_FUNCTION(domxml_node_name)
                        str = "#text";
                        break;
 
+               case XML_ATTRIBUTE_NODE:
+                       str = n->name;
+                       break;
+
                case XML_CDATA_SECTION_NODE:
                        str = "#cdata-section";
                        break;