Re: simplify DOM api

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andreas Korthaus wrote:

I think this should be OK, or shouldn't I do it this way?
Both ways are perfectly acceptable and all up to personal preference. In fact, to support the way you are doing it was one of the reasons why DOM classes were allowed to be extended.

Perhaps you have seen that I've used a "xml_entity_encode()" function. This function works like htmlspecialchars(), but replaces ' with ' and not '. Or do all of you use htmlspecialchars()? Does it work with Unicode strings?
I typically use htmlspecialchars() and remember that you are going to have to work with UTF-8, which is compatible with htmlspecialchars(), when editing a tree. You can also look at using xmlwriter, when creating serialized trees, that automatically does escaping for you.

Rob

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux