XML Parsing Error: not well-formed - this is due to characters like
<p>I've built a SQL XML program which works fine for most records but falls over on just a few records because of the data.</p>

<p>How do I overcome the problem with unwanted characters. I'm generating an XML file from an SQL on a Oracle11g database but get the below message in a few records. One of the records shows a XML tag field title containing "ô9.96 + õ.99 P&amp;H" see below output. </p>

<pre><code>   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;AV-XML xmlns="http://www.iceservices.com/0.7/AV-XML" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.iceservices.com/0.7/AV-XML AV-XML.xsd"&gt;
 &lt;Delivery&gt;
  &lt;supplierType&gt;ADMIN-AGENCY&lt;/supplierType&gt;
  &lt;versionId&gt;0.7&lt;/versionId&gt;
  &lt;creationDateTime&gt;2016-04-19T13:47:57+0100&lt;/creationDateTime&gt;
  &lt;otherInformation&gt;MIGRATION FIRST DELIVERY&lt;/otherInformation&gt;
&lt;/Delivery&gt;
&lt;Message&gt;
&lt;messageSequenceId&gt;1&lt;/messageSequenceId&gt;
&lt;messageType&gt;NEW&lt;/messageType&gt;
&lt;otherInformation&gt;MIGRATION FIRST DELIVERY&lt;/otherInformation&gt;
&lt;Production&gt;
  &lt;prodCategoryType&gt;COMMERCIAL&lt;/prodCategoryType&gt;
  &lt;prodStatusType&gt;SKELETON&lt;/prodStatusType&gt;
  &lt;prodActive&gt;true&lt;/prodActive&gt;
  &lt;prodCueStatusType&gt;NO&lt;/prodCueStatusType&gt;
  &lt;prodTvInhouse&gt;Y&lt;/prodTvInhouse&gt;
  &lt;prodTotalDuration&gt;PT3M&lt;/prodTotalDuration&gt;
  &lt;priorityValue&gt;1&lt;/priorityValue&gt;
  &lt;prodTitle&gt;
    &lt;title&gt;CLASSIC LOVE SONGS OF RN R&lt;/title&gt;
    &lt;titleType&gt;ORIGINAL&lt;/titleType&gt;
  &lt;/prodTitle&gt;
  &lt;prodTitle&gt;
    &lt;title&gt;ô9.96 + õ.99 P&amp;amp;H&lt;/title&gt;
    &lt;titleType&gt;CAMPAIGN&lt;/titleType&gt;
  &lt;/prodTitle&gt;
  &lt;prodId&gt;
    &lt;idType&gt;SOCIETY-ID&lt;/idType&gt;
    &lt;id&gt;75125334&lt;/id&gt;
  &lt;/prodId&gt;
  &lt;prodId&gt;
    &lt;idType&gt;CLOCKID&lt;/idType&gt;
    &lt;id&gt;TMECSRL505180&lt;/id&gt;
  &lt;/prodId&gt;
  &lt;prodAuthorizedIp&gt;
    &lt;LASTNAME&gt;BACC&lt;/LASTNAME&gt;
  &lt;/prodAuthorizedIp&gt;
 &lt;/Production&gt;
 &lt;/Message&gt;
 &lt;/AV-XML&gt;
</code></pre>

<p>When I try to open this up in firefox or IE I get the below message which directs me to the line were the error is. Which is the ô9.96 + õ.99 P&amp;H above.</p>

<pre><code>XML Parsing Error: not well-formed
Location: file://///data2/data/Download/d7prdv1/prsrepreports  /test_error_1.xml
Line Number 26, Column 16:        &lt;title&gt;49.96 + �5.99 P&amp;amp;H&lt;/title&gt;
</code></pre>

<p>How do I get around this problem, should I replace the characters using the REPLACE Oracle function with something more acceptable?</p>