From: Sterling Hughes Date: Mon, 26 May 2003 02:42:41 +0000 (+0000) Subject: add namespace support X-Git-Tag: RELEASE_1_0_2~581 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c511d9f24997b87d3a9684b618f1927c88471cc;p=php add namespace support --- 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);