note 28655 added to function.xpath-eval

From: Date: Sun, 19 Jan 2003 23:46:37 +0000
Subject: note 28655 added to function.xpath-eval
Groups: php.notes 
Request: Send a blank email to php-notes+get-42399@lists.php.net to get a copy of this message
You can indeed use the result object of xpath_eval(). You just have to be careful to pass the result by reference! (note the ampersand's position). $objXP = xpath_new_context($objDom) $objTest = &xpath_eval($objXP,"//lalala"); $objTest->nodeset[0]->set_attribute("test","test data"); echo htlentities($objDom->dump_mem()); just be careful that is you pass around values from $objTest then they also need to be passed by reference. -- http://www.php.net/manual/en/function.xpath-eval.php http://master.php.net/manage/user-notes.php?action=edit+28655 http://master.php.net/manage/user-notes.php?action=delete+28655 http://master.php.net/manage/user-notes.php?action=reject+28655

« previous php.notes (#42399) next »