title: How to replace &apos; or any special character in when using XMLELEMENT Oracle
body: <p>I have the below query. How to keep the apostrophe (<code>'</code>) intact and not getting it replaced by <code>&amp;apos</code>
  There are other characters also I want to handle like <code>&amp;</code></p>
  <pre><code>SELECT RTRIM(XMLAGG(XMLELEMENT(E,'I''m'||':')).EXTRACT('//text()'),':')
    FROM dual;
  </code></pre>
  <p>Output:</p>
  <pre><code>I&amp;apos;m
  </code></pre>
  <p>Thanks.</p>