summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Smith <joey@php.net>2001-08-21 21:49:32 +0000
committerJoey Smith <joey@php.net>2001-08-21 21:49:32 +0000
commitf0ea3478cb42b67878b8ac8499d68325df7dcaf6 (patch)
tree7b5abef30443474884dd14957ff7c8457b76482b
parentf9d913537b486ed7698c768cd3052f991c862149 (diff)
downloadphp-git-f0ea3478cb42b67878b8ac8499d68325df7dcaf6.tar.gz
Some changes to help out previous users of domxml...
node::tagname == node::name. Add property "type" to textnode types.
-rw-r--r--ext/domxml/php_domxml.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c
index 1db3cc637c..a42db38bff 100644
--- a/ext/domxml/php_domxml.c
+++ b/ext/domxml/php_domxml.c
@@ -191,6 +191,7 @@ static zend_function_entry php_domxmlnode_class_functions[] = {
static zend_function_entry php_domxmlelement_class_functions[] = {
PHP_FALIAS(domelement, domxml_element, NULL)
+ PHP_FALIAS(name, domxml_elem_tagname, NULL)
PHP_FALIAS(tagname, domxml_elem_tagname, NULL)
PHP_FALIAS(get_attribute, domxml_elem_get_attribute, NULL)
PHP_FALIAS(set_attribute, domxml_elem_set_attribute, NULL)
@@ -669,8 +670,10 @@ static zval *php_domobject_new(xmlNodePtr obj, int *found TSRMLS_DC)
object_init_ex(wrapper, domxmltext_class_entry);
rsrc_type = le_domxmltextp;
content = xmlNodeGetContent(nodep);
- if (content)
+ if (content) {
+ add_property_long(wrapper, "type", nodep->type);
add_property_stringl(wrapper, "content", (char *) content, strlen(content), 1);
+ }
break;
}