PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » XML » XML_Serializer » Bug #3180

Serialize/unserialize CDATA elements

Details

Request #3180Serialize/unserialize CDATA elements
Submitted2005-01-12 19:52 UTC
Fromroehr at zilleon dot com
Assignedschst
StatusClosed
PackageXML_Serializer
PHP VersionIrrelevant
OSirrelevant
Roadmaps(Not assigned)

Comments

[2005-01-12 19:52 UTC] roehr at zilleon dot com

Description:
------------
Hi,

it would be great to be able to serialize/unserialize CDATA elements. As XML_Serializer sits on top of XML_Util and Util does provide this feature, maybe it's not that hard to integrate this into XML_Serializer as well.

Thank you very much for your efforts!

Best regards,
Torsten Roehr

[2005-01-13 12:39 UTC] roehr at zilleon dot com

One more thing: Why is htmlspecialchars() applied by default when serializing? Shouldn't the resulting XML string be output-neutral?

Maybe you could add an option for this that defaults to true to keep BC. Thank you.

[2005-01-14 16:29 UTC] pear at yavanna dot net

I don't know about serializing CDATA Elements with XML_Serializer, but unserialize works. Though the data's spaces are trimmed at beginning and end (in the endHandler of XML_Unserializer), which is definitively undesired.

If you kindly could consider this in the next release?
Thanks!