Home » XML » XML_Serializer » Bug #3700
The data are always trimmed
Details
| Submitted | 2005-03-04 10:07 UTC |
|---|---|
| From | rguglielmi at libero dot it |
| Assigned | schst |
| Status | Closed |
| Package | XML_Serializer |
| PHP Version | Irrelevant |
| OS | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-03-04 10:07 UTC] rguglielmi at libero dot it
Description:
------------
The spaces at the beginning and at the end of the data are deleted in the endHandler function of the class XML_Unserializer.
The line of code should be this:
$data = trim($this->_dataStack[$this->_depth]);
[2005-04-12 08:33 UTC] rguglielmi at libero dot it
I report a part of the Request #3180:
>>[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!
>>
>>[2005-01-14 16:33 UTC] schst at php dot net
>>Could you please open a different bug report for this? one >>is a new
>>feature, the other one is a bug.
>>Thanks.
>>Stephan
Have I misunderstood something?
Maybe you could add an option for this behaviour.
Thanks
[2005-05-10 20:50 UTC] paul at paulbaranowski dot org
I also have a problem due to this behavior. I am storing strings in an XML file and I need to read them back out EXACTLY as I put them in. Note: the spaces are PRESERVED when writing the XML - why wouldnt it strip off the spaces at this point as well?
Perhaps you could explain *why* this is the intended behavior? Is it part of some spec that this must behave this way?
An option to change this behavior would be great!
Thanks for the wonderful code!