title: XStream apostrophe Issue in converting Java Object to XML
body: <p>I am using <strong>com.thoughtworks.xstream.XStream</strong> to Generate xml String. I parse Object to xstream.<strong>toXML</strong> method and I get the xml output according to the way I need. </p>
  
  <pre><code>    &lt;myxml&gt;
        &lt;test type="test" name="test"&gt;
          &lt;question id="Name" answer="Micheal"/&gt;
          &lt;question id="Address" answer="Home"&gt;
            &lt;details name="First Address"&gt;
              &lt;detailanswer&gt;friend&amp;apos;s House&lt;/detailanswer&gt;
            &lt;/details&gt;
          &lt;/basequestion&gt;
        &lt;/test&gt;
      &lt;/myxml&gt;
  
  XStream xstream = new XStream();
  xstream.alias("myxml", MyXml.class);
  xstream.alias("test", Test.class);
  xstream.alias("question", Question.class);
  xstream.alias("details", Details.class);
  xstream.alias("detailanswer", String.class);
  xstream.addImplicitCollection(MyXml.class, "test");
  xstream.addImplicitCollection(Test.class, "question");
  xstream.addImplicitCollection(Question.class, "details");
  xstream.addImplicitCollection(Details.class, "detailanswer");
  
  xstream.useAttributeFor(Test.class, "type");
  xstream.useAttributeFor(Test.class, "name");
  
  xstream.useAttributeFor(Question.class, "id");
  xstream.useAttributeFor(Question.class, "answer");
  xstream.useAttributeFor(Details.class, "name");
  
  return xstream.toXML(eform);
  </code></pre>
  
  <p>Following is the Object structure. </p>
  
  <pre><code>Inside MyXml there is List&lt;Test&gt;
  Test has List&lt;Question&gt;, String type, String name
  Question has List&lt;Details&gt;, String id, String answer.
  Details has List&lt;String&gt; detailAnswer, String name
  </code></pre>
  
  <p>So the element in the question, <strong>Friend's house</strong> is added to the List detailAnswer in Details class. </p>
  
  <p>I get <code>friend&amp;apos;s House</code> instead of <code>friend's house</code>. How can I resolve this. Is there special way to convert using XStream?</p>