<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Special character / Umlaut in XML with ch.ivyteam.ivy.scripting.objects.Xml</title><link>https://answers.axonivy.com/questions/2366/special-character-umlaut-in-xml-with-ch-ivyteam-ivy-scripting-objects-xml</link><description>&lt;p&gt;When i do for example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Xml field = new Xml("Field", "KOSTENTR&amp;amp;#196;GER");  // Ä
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;"&amp;amp;" is converted to "&amp;amp; amp;", when i convert the xml object to string. &lt;/p&gt;
&lt;p&gt;It's look for example like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;FIELD&amp;gt;KOSTENTR&amp;amp;amp;#196;GER&amp;lt;/FIELD&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How can i avoid this?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2366/special-character-umlaut-in-xml-with-ch-ivyteam-ivy-scripting-objects-xml" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 11 Jan 2017 16:43:20 -0500</lastBuildDate><item><title>Answer by Barbara Brugger</title><link>https://answers.axonivy.com/questions/2366/special-character-umlaut-in-xml-with-ch-ivyteam-ivy-scripting-objects-xml/2370</link><description>&lt;p&gt;The problem with '&amp;amp;' in an XML file is, that everything after the '&amp;amp;' until the next semicolon will be encoded. A single '&amp;amp;' 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 '&amp;amp;' to '&amp;amp; amp;', even if it stands already for an encoded character (see &lt;a href="http://stackoverflow.com/questions/730133/invalid-characters-in-xml)."&gt;http://stackoverflow.com/questions/730133/invalid-characters-in-xml).&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You could just replace the encoded parts with the character itself ("KOSTENTRÄGER" instead of "KOSTENTR&amp;amp;#196 ;GER") before passing the String to the XML object. There are several possibilities to do this, maybe this link is helpful: &lt;a href="http://stackoverflow.com/questions/994331/java-how-to-unescape-html-character-entities-in-java"&gt;http://stackoverflow.com/questions/994331/java-how-to-unescape-html-character-entities-in-java&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Barbara Brugger</dc:creator><pubDate>Wed, 11 Jan 2017 16:43:20 -0500</pubDate><guid>https://answers.axonivy.com/questions/2366/special-character-umlaut-in-xml-with-ch-ivyteam-ivy-scripting-objects-xml/2370</guid></item></channel></rss>