When i do for example:
"&" is converted to "& amp;", when i convert the xml object to string. It's look for example like this:
How can i avoid this? asked 10.01.2017 at 12:42 tiago |
The problem with '&' in an XML file is, that everything after the '&' until the next semicolon will be encoded. A single '&' without a semicolon (or with a meaningless term between them) would lead to an invalid XML file. To avoid this problem, the serializer just converts every '&' to '& amp;', even if it stands already for an encoded character (see http://stackoverflow.com/questions/730133/invalid-characters-in-xml). You could just replace the encoded parts with the character itself ("KOSTENTRÄGER" instead of "KOSTENTRÄ ;GER") before passing the String to the XML object. There are several possibilities to do this, maybe this link is helpful: http://stackoverflow.com/questions/994331/java-how-to-unescape-html-character-entities-in-java answered 11.01.2017 at 16:43 Barbara Brugger ♦♦ |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 10.01.2017 at 12:42
Seen: 2,084 times
Last updated: 11.01.2017 at 16:44