JCP wrote:this is your wrong assumption. as i stated, this is correct. please read up on the details of xml serialization. also, like i said above, if you read this data with an xml parser, you will get back exactly the text you wrote.
As mentioned earlier the problem is when the unicode value of ampersand is mentioned "& # 26 ;" in the text node , the output after serialization comes as
"& amp ; # 26;" which is obviously not correct.
The output I was expecting was same unicode value "& # 26 ;".you are expecting wrong.
jtahlborn wrote:I am not saying that xml serializer can write & instead of "& amp;". But it should also write "& # 26;" (unicode) as & as its also a valid case which it is not doing.
i'm sorry that doesn't fulfill your requirement. the xml serializer is fulfilling the requirements of an xml serializer, which say it can write an "&" in the data as "& amp;".