|
Posted by Erwin Moller on 05/16/06 11:47
r_topor@yahoo.com wrote:
> As of PHP 5.1, why aren't there functions that return a node's
> children, a node's first/last/nth child, a node's parent/previous
> sibling/next sibling, etc., as in the DOM specification? How are you
> currently meant to traverse a DOM tree without these functions? Or
> perhaps they exist somewhere in the documentation, but not under the
> list of DOM functions - if so, where are they?
>
> Rodney
Hi Rodney,
That is like asking: "Where are the rocket blueprints for the Saturn5 in
PHP?"
PHP is executed at the server, and returns a response, which can be HTML.
If you want to use DOM-specific functionality, this is executed by the
browser that receives the HTML produced by PHP.
PHP is completely out-of-touch with the HTML it delivered.
You need Javascript to access DOM in a browser.
Of course, this doesn't mean PHP cannot be used to deliver nice
Javascript/HTML/etc, but PHP is NOT in charge anymore once the HTML arrives
at some client (browser).
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|