Hello all,

I'm struggling here, but no joy so far.

Having this XML file that I'm loading using simplexml_load_file():

I need to add some <domain:create> children nodes after line 8.

What do I need to add?

In order to do so, I have used the following php snipped:

I'm getting this warning and, after it, a fatal error:
Warning: SimpleXMLElement::addChild() [simplexmlelement.addchild]:
Cannot add child. Parent is not a permanent member of the XML tree.
(line number 1 of last paste bin)

Fatal error: Call to a member function addChild() on a non-object
(line number 2 of last paste bin)

Note that:
The constant used is correct. The php version is higher then 5.1.
On the same command, later on this code, I was able to create child
nodes with no issues.

I'm far (veery far) from being a guru, so please, what can I do to
debug this, and find out what's going on?

Thanks a lot,

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to