diff options
author | Christian Stocker <chregu@php.net> | 2002-03-13 08:08:22 +0000 |
---|---|---|
committer | Christian Stocker <chregu@php.net> | 2002-03-13 08:08:22 +0000 |
commit | 7542aa74996d9a7deee2a8ad860601cadce30871 (patch) | |
tree | 114602a2ec2a55180cfc92b3143adf771a34b4dd /ext/domxml/php_domxml.c | |
parent | da773a0cfc26fbb8767054d0d96c6acc4aed850f (diff) | |
download | php-git-7542aa74996d9a7deee2a8ad860601cadce30871.tar.gz |
Return attribute name in node_name(), if it's a XML_ATTRIBUTE_NODE
Diffstat (limited to 'ext/domxml/php_domxml.c')
-rw-r--r-- | ext/domxml/php_domxml.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index 5444ed24eb..0963ad8ad0 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -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; |