PHP - XML conversion <p>I'm new to stackoverflow and after some searching didn't find an answer to my question so I'm hoping someone can help me out.</p> <p>I have to use this web service method that takes three parameters, a string and two xml params.</p> <p>Below's an example of the code I'm using. The web service method throws an exception, 'Required parameters for method SubmitXml are null.'</p> <p>So I'm guessing it's not receiving any xml on the 2nd and 3rd params. Can anyone give me a hint on how to correctly use the DOM or any other with PHP here? thank you in advance. </p> <pre><code> $soapClient = new SoapClient($this-SOAPURL, array('login'=&gt;$this-&gt;account,'password'=&gt;$this-&gt;password)); $xmlstr ='&lt;xmlbody&gt;'; $xmlstr.='&lt;someXML&gt;Some XML text content here!&lt;/someXML&gt;'; $xmlstr.='&lt;/xmlbody&gt;'; $dom = new DOMDocument(); $dom-&gt;loadXML($xmlstr); $filter = new DOMDocument(); $filter-&gt;loadXML('&lt;_ xmlns=""/&gt;'); print_r ($soapClient-&gt;SubmitXml('userIDString',$dom-&gt;saveXML(), $fil-&gt;saveXML())); </code></pre>