mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
This is no longer usefull in any way.
This commit is contained in:
parent
b3853af0b7
commit
6915f5a2f5
@ -1421,37 +1421,6 @@ static void php_sxe_iterator_rewind(zend_object_iterator *iter TSRMLS_DC)
|
||||
}
|
||||
|
||||
|
||||
/* {{{ getChildren()
|
||||
*/
|
||||
SXE_METHOD(getChildren)
|
||||
{
|
||||
php_sxe_object *sxe;
|
||||
xmlNodePtr node;
|
||||
xmlNodePtr child;
|
||||
zval *value = NULL;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 0) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
sxe = php_sxe_fetch_object(getThis() TSRMLS_CC);
|
||||
GET_NODE(sxe, node);
|
||||
|
||||
array_init(return_value);
|
||||
if (node) {
|
||||
child = node->children;
|
||||
while (child) {
|
||||
if (node->type == XML_ELEMENT_NODE) {
|
||||
MAKE_STD_ZVAL(value);
|
||||
_node_as_zval(sxe, child, value TSRMLS_CC);
|
||||
add_next_index_zval(return_value, value);
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto simplemxml_element simplexml_import_dom(domNode node)
|
||||
Get a simplexml_element object from dom to allow for processing */
|
||||
PHP_FUNCTION(simplexml_import_dom)
|
||||
@ -1541,7 +1510,6 @@ static zend_function_entry sxe_functions[] = {
|
||||
SXE_ME(validate_schema_file, NULL, ZEND_ACC_PUBLIC)
|
||||
#endif
|
||||
SXE_ME(xsearch, NULL, ZEND_ACC_PUBLIC)
|
||||
SXE_ME(getChildren, NULL, ZEND_ACC_PUBLIC)
|
||||
SXE_ME(attributes, NULL, ZEND_ACC_PUBLIC)
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
@ -1,51 +0,0 @@
|
||||
--TEST--
|
||||
SimpleXML and recursion
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('simplexml')) print 'skip';
|
||||
if (!class_exists('RecursiveIteratorIterator')) print 'skip RecursiveIteratorIterator not available';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$sxe = simplexml_load_file(dirname(__FILE__).'/006.xml');
|
||||
|
||||
foreach(new RecursiveIteratorIterator($sxe, 1) as $name => $data) {
|
||||
var_dump($name);
|
||||
var_dump(get_class($data));
|
||||
var_dump(trim($data));
|
||||
}
|
||||
|
||||
echo "===DUMP===\n";
|
||||
|
||||
var_dump(get_class($sxe));
|
||||
var_dump(trim($sxe->elem1));
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(5) "elem1"
|
||||
string(17) "simplexml_element"
|
||||
string(10) "Bla bla 1."
|
||||
string(7) "comment"
|
||||
string(17) "simplexml_element"
|
||||
string(0) ""
|
||||
string(5) "elem2"
|
||||
string(17) "simplexml_element"
|
||||
string(28) "Here we have some text data."
|
||||
string(5) "elem3"
|
||||
string(17) "simplexml_element"
|
||||
string(19) "And here some more."
|
||||
string(5) "elem4"
|
||||
string(17) "simplexml_element"
|
||||
string(15) "Wow once again."
|
||||
string(6) "elem11"
|
||||
string(17) "simplexml_element"
|
||||
string(10) "Bla bla 2."
|
||||
string(7) "elem111"
|
||||
string(17) "simplexml_element"
|
||||
string(7) "Foo Bar"
|
||||
===DUMP===
|
||||
string(17) "simplexml_element"
|
||||
string(10) "Bla bla 1."
|
||||
===DONE===
|
Loading…
Reference in New Issue
Block a user