note 74688 deleted from function.dom-domdocument-createelementns by tularis

From: Date: Mon, 23 Apr 2007 21:30:32 +0000
Subject: note 74688 deleted from function.dom-domdocument-createelementns by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-125812@lists.php.net to get a copy of this message
Note Submitter: primaryspace at hotmail dot com Reason: useless ---- Passing null as the first value ($namespaceURI) results in the creation of a node without a namespace associated with it, just as though createElement() were called. <?php $dom = new DOMDocument('1.0'); $dom->loadXML('<root/>'); $el = $dom->createElementNS(null, 'node', 'value'); $dom->documentElement->appendChild($el); print $dom->saveXML(); /* Output: <?xml version="1.0" ?> <root> <node>value</node> </root> */ ?>

« previous php.notes (#125812) next »