Hi there,
i've got the follwing problem:
I'm trying to create an new element in an existing dom xml tree, using create_element(). But every time i call this function the return value is false. Cause there is no further explaination why i get "false" i am trying to find some little help here.
I've already tried to run some example code from the documentation, but this won't work either.
Here is the example code and the failures from the php-parser:
1: <?
2: $doc = domxml_new_doc("1.0");
3: $root = $doc->create_element("HTML");
4: $root = $doc->append_child($root);
5: $head = $doc->create_element("HEAD");
6: $head = $root->append_child($head);
7: ?>
Warning: append_child() expects parameter 1 to be object, null given in test2.php on line 4
Fatal error: Call to a member function append_child() on a non-object in test2.php on line 6
I know, that the second error is an result of the warning in line 4, cause $root will be casted to an non object.
Cause these functions are well known and i expect they are used very often by other programmers, i can not understand why they don't work fine within my code...
My system is the follwing PHP 5.0.1, Apache 2.0.50, Windows 2000.
Thanks you for your help,
silver...