dav wrote:
Hi,
I have question about \0 character with DOM :
<snip />
What to do with the character \0 ? encode this character to obtain :
<![CDATA[foo&00;bar]]> ? or skip the character with str_replace("\0", '',
$cdata) ?
CDATA is raw data and why it doesnt get magically encoded. If you remove
the character then you are altering the raw data - also not a good thing
typically.
What is the best thing to do ? i like to conserve the \0 because is a blob data
Jabber is how to transmit binary ?
Never use CDATA sections. blob data should always be base64 encoded (or
some other encoding). The data can then be transmitted in a regular element.
Note that it is possible that your blob data can contain the following
sequence of characters "]]>" which would effectively terminate the CDATA
block even though there really is more data.
Rob
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php