Re: SimpleXML add a node

From: Date: Fri, 11 Mar 2005 20:10:45 +0000
Subject: Re: SimpleXML add a node
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-210545@lists.php.net to get a copy of this message
> 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 ...

« previous php.general (#210545) next »