note 92668 deleted from function.simplexml-element-xpath by danbrown

From: Date: Wed, 16 Sep 2009 15:49:29 +0000
Subject: note 92668 deleted from function.simplexml-element-xpath by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-160669@lists.php.net to get a copy of this message
Note Submitter: mikeyhopkins at hotmail dot com ---- To fix Glenn Schmidt's noted behaviour that the parent elements are searched even if your context is a child element, you can run the child element through something such as: <?php // ... set $result to contain a SimpleXML object $result = simplexml_load_string($result->asXML()); $result->xpath('/your/query/'); ?> Which will destroy any parental references. If you rely on them, then this way will not alleviate the issue.

« previous php.notes (#160669) next »