Re: SimpleXML add a node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> php.net/dom

??

Like this?

---

try {

$dom = new DOMDocument();

$config = 
$dom->appendChild($dom->importNode(dom_import_simplexml($this->configXML),true));

$config->appendChild( $dom->createElement(($mode? 'softactive':'active')) );

$this->configXML = simplexml_import_dom($config);

} catch(Exception $e) {}



It ist strange... It runs one time, the second time I receive the following 
error.

Warning: DOMDocument::importNode() [function.importNode]: Cannot import: 
Node Type Not Supported in ...

Warning: appendChild() expects parameter 1 to be DOMNode, boolean given in 
...

Fatal error: Call to a member function appendChild() on a non-object in ...

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux