>I am planning to use PHP to develop some scripts that will need to 
>create and manipulate html pages.  One of the things that will be 
>created is a DOM tree of the html.
>After reading the manual I've found that php supports the event-driven 
>and dom xml, but with the latter tagged as EXPERIMENTAL.  I've also 
>noticed that as of 4.3.0-dev (which I am using) the api has changed.
>So I'd like to know how "experimental" (also stable) this support is and 
>suggestions regarding this issue and DOM itself.
>One of the main issues is that I'll need to cope with html (not xml) and 
>mostly not "well-formed".

The following statements are based strictly on heresay:

I don't think the DOM in PHP lets you have any "hooks" for mal-formed XML.

It either is well-formed, or DOM pukes all over your pretty blue suede

I think you may be better off writing a SAX parser-based XML algorithm.

You'll be able to deal with the idiosyncracies of your HTML-coders better,
and to recover with more flexibility from the errors.

I think DOM will give you a line number and column (character within the
line) number, and maybe even an XML error message.  But you won't be able to
convince it to just "accept" the HTML and move on with life as it is. 
You'll be forced to "fix" the HTML to match XML specs, which, like is just
wrong, since HTML isn't XML.

Like Music?  http://l-i-e.com/artists.htm

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to