diff options
author | Sterling Hughes <sterling@php.net> | 2003-05-26 02:42:41 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@php.net> | 2003-05-26 02:42:41 +0000 |
commit | 3c511d9f24997b87d3a9684b618f1927c88471cc (patch) | |
tree | a10ea15ce3781dd46ffc12b14db4716b17d31575 | |
parent | e3e22511b1e1bda759b6acb7717bc26568732faf (diff) | |
download | php-git-3c511d9f24997b87d3a9684b618f1927c88471cc.tar.gz |
add namespace support
-rw-r--r-- | ext/simplexml/simplexml.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 302703be7d..1674250ce4 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -113,7 +113,14 @@ sxe_property_read(zval *object, zval *member TSRMLS_DC) node = node->xmlChildrenNode; while (node) { - if (!xmlStrcmp(node->name, name)) { + if (node->ns && !xmlStrcmp(node->ns->prefix, name)) { + APPEND_PREV_ELEMENT(counter, value); + + MAKE_STD_ZVAL(value); + _node_as_zval(sxe, node->parent, value); + + APPEND_CUR_ELEMENT(counter, value); + } else if (!xmlStrcmp(node->name, name)) { APPEND_PREV_ELEMENT(counter, value); MAKE_STD_ZVAL(value); |