RE: [PHP-DEV] DOM Implementation for PHP3

From: Date: Fri, 16 Apr 1999 05:35:01 +0000
Subject: RE: [PHP-DEV] DOM Implementation for PHP3
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-5090@lists.php.net to get a copy of this message
Hi all, After a quick scan of the W3C's DOM spec, here are my thoughts on a DOM Implementation for PHP. I'm not particularly interested in an OCX-based IDE for PHP, so I'll just ignore that thread... The DOM could be implemented as a library of classes written in PHP. This would be a fairly sizable chunk of code and for performance reasons, it might be desirable to implement it as pseudo-classes of the kind created by the dir() function. (I don't know anything about the magic behind that - anyone care to comment?) There would also have to be an input function for parsing out a HTML/XML document and returning a DOM Document object. This would be the root of the document tree, which could be manipulated by the script. The modified document tree could then be passed to a complementary output function which would traverse the tree and return the resulting HTML. For developers of web-based applications (like myself) this would be an elegant way of separating the processing code from the display code. On the other hand, I'm not sure that it would be useful enough to make it worthwhile. Manipulating the document tree would probably take more code than simply generating the raw HTML, and would likely be significant overhead. On the client side, the DOM is really useful as a standard interface for DHTML, but on the server side, it seems to be less useful. I may be missing something though, because the idea is intriguing. Maybe it would be useful as a higher level API to the XML functions. Colin --------------------------------------------------------- Colin Putney colin@whistler.net Bit Flinger (604) 932-0606 x21 Whistler Networks http://www.whistler.net/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5090) next »