note 91617 added to class.domdocument

From: Date: Fri, 19 Jun 2009 16:19:58 +0000
Subject: note 91617 added to class.domdocument
Groups: php.notes 
Request: Send a blank email to php-notes+get-157133@lists.php.net to get a copy of this message
It should be pointed out that DOMDocument extends DOMNode in every way... that means that you even have access to the DOMNode properties (even though the documentation here does not mention them as being inherited). I used to use an XPath query to access nodes from a DOMDocument (when getElementById or getElementsByTagName weren't usable), as I believed this to be the only way. However, since DOMDocument fully extends DOMNode, you can use DOMDocument->firstChild for example to get the first child node. This simplifies things quite a bit when using an XPath query may seem a bit excessive to get access to something as simple as the child nodes. ---- Server IP: 69.147.83.197 Probable Submitter: 99.241.6.105 ---- Manual Page -- http://www.php.net/manual/en/class.domdocument.php Edit -- https://master.php.net/note/edit/91617 Del: integrated -- https://master.php.net/note/delete/91617/integrated Del: useless -- https://master.php.net/note/delete/91617/useless Del: bad code -- https://master.php.net/note/delete/91617/bad+code Del: spam -- https://master.php.net/note/delete/91617/spam Del: non-english -- https://master.php.net/note/delete/91617/non-english Del: in docs -- https://master.php.net/note/delete/91617/in+docs Del: other reasons-- https://master.php.net/note/delete/91617 Reject -- https://master.php.net/note/reject/91617 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#157133) next »