 <p>Any document can have only one XML declaration and it must be at the very beginning of the document.</p> <p>The parser will see this as either nesting of documents or improper placement of the XML declaration, both of which will cause an error.</p> <pre><code>**&lt;?xml version="1.0" encoding="utf-8"?&gt;** &lt;soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"&gt; &lt;soapenv:Body&gt; &lt;return&gt; **&lt;?xml version="1.0"?&gt;** &lt;catalog&gt; </code></pre>