Details
-
Type: Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.3
-
Component/s: None
-
Labels:None
Description
Hello,
according to XML 1.0 spec, valid XML charactes are
#x9 | #xA | #xD | x20-#xD7FF | xE000-#xFFFD | x10000-#x10FFFF
and any other characters are not allowed to appear in XML document, even as character references.
I tried to serialize String "\0", and got illegal character NUL in XML file when used default serializer and got invalid character reference � when used StaxWriter.
I have the same issue with a serialized class.
I've tried all Driver classes provided by the XStream Package, but get in any case the error: Character reference "�" is an invalid XML character
when I try to parse the serialized XML as a DOM4J document.
There are several characters serialized which are non-printable and also not allowed in XML.
Why does XStream creates them instead of excaping them or providing an entitiy declaration?
Any hint how to care with such objects? From my point of view it should be part of XStream to create a wellformed XML structure. But maybe its a general of binary data and XML and how to bring them together.
Thanks,
Roman.