Re: Using DOM textContent Property

From: Date: Wed, 03 Sep 2008 06:17:34 +0000
Subject: Re: Using DOM textContent Property
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-279375@lists.php.net to get a copy of this message
Tim Gustafson a écrit :
$Elements = $HTML->getElementsByTagName("*"); for ($X = 0; $X < $Elements->length; $X++) { ... SNIP ... }
Why don't use the XPath ? <http://fr.php.net/manual/en/class.domxpath.php> <http://fr.php.net/manual/en/domxpath.query.php> This query fetch all a elements with no title attribute or empty title attribute : '//a[not(@title) or @title = ""]' ; -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org

« previous php.general (#279375) next »