note 101499 added to class.domnode
| From: | altreus at perl dot com | Date: | Tue, 21 Dec 2010 11:32:34 +0000 |
| Subject: | note 101499 added to class.domnode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175091@lists.php.net to get a copy of this message | ||
Beware when using $node->firstChild when trying to access the first child *element*.
In some cases, the first child of your node may in fact be a DOMTextNode containing the whitespace
between your node's opening tag and the opening tag of the first child element. You should
generally be using XPath to find elements by name and position, and use $firstChild when you know
for sure that it is the first DOMNode that you want.
----
Server IP: 92.48.74.199
Probable Submitter: 87.84.128.98
----
Manual Page -- http://www.php.net/manual/en/class.domnode.php
Edit -- https://master.php.net/note/edit/101499
Del: integrated -- https://master.php.net/note/delete/101499/integrated
Del: useless -- https://master.php.net/note/delete/101499/useless
Del: bad code -- https://master.php.net/note/delete/101499/bad+code
Del: spam -- https://master.php.net/note/delete/101499/spam
Del: non-english -- https://master.php.net/note/delete/101499/non-english
Del: in docs -- https://master.php.net/note/delete/101499/in+docs
Del: other reasons-- https://master.php.net/note/delete/101499
Reject -- https://master.php.net/note/reject/101499
Search -- https://master.php.net/manage/user-notes.php