Re: [PHP-XML-DEV] Validating XML
[email protected] (Adam Trachtenberg) Mon, 26 Apr 2004 23:58:47 -0400
| Newsgroups | php.general,php.xml.dev |
|---|---|
| Message-ID | <[email protected]> |
On Apr 26, 2004, at 9:50 PM, Michael wrote: > Thanks for the reply. I am guessing that the schemaValidate() method > is new and related to your work on revamping the DOM extension. Yes, schemaValidate() is new to PHP 5, but I cannot take claim for the revamped DOM extension. That credit goes to Rob Richards, Christian Stocker, and Marcus Boerger. > It appears that the docs for this extension have not yet caught up. > Besides trying to figure out the C code (i'm no C coder and that would > be a bit of a task although any tips would be appreciated), how would > you recommend that a Joe like me figure out what the extension can do > in its current incarnation? I know of two good online articles, one by myself and one my Christian Stocker. My article ran in "International PHP Magazine" and is available at http://www.php-mag.net/itr/online_artikel/ psecom,id,503,nodeid,114.html; Christian's is up on Zend's web site at http://www.zend.com/php5/articles/php5-xmlphp.php. My piece is more of a gentle introduction to DOM and PHP 5, but it also covers XSLT and XPath. Christian's is more terse, but covers all the new XML pieces of PHP 5, including DOM, XSLT, XPath, SimpleXML, validation, and more. They're both worth reading, IMHO. :) > Also, I'm wondering about DOM XML and simpleXML status. Both are > documented as being experimental. Are both in a state of flux right > now? Also, will they be in a stable state as PHP5 stable is released? The documentation is lagging behind extension development. The new DOM extension and SimpleXML will both be marked stable when PHP 5 goes final, AFAIK. The old PHP 4 DOM XML "experimental" extension is deprecated and will not be supported in PHP 5. There are some changes between the old and new DOM extensions, so you will need to port your code; however, the new DOM extension is *much* better than the old one, so it's worth the time and effort. As a shameless plug, if you have more questions, I suggest that you buy my new book, "Upgrading to PHP 5." It's being published by O'Reilly and will be available in July. :) -adam -- [email protected] author of o'reilly's php cookbook avoid the holiday rush, buy your copy today!