title: Error : Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, string given
body: <p>My code looks like this</p>
  
  <pre><code>     $xml = new \DOMDocument();
        .
        .
        .   
       $VAST_Impression ="some_url"
       $xml_Impression = $xml-&gt;Impression= htmlspecialchars($VAST_Impression);
       $xml_InLine-&gt;appendChild($xml_Impression);
  </code></pre>
  
  <p>I get error like this:</p>
  
  <blockquote>
    <p>PHP Recoverable Error – yii\base\ErrorException</p>
    
    <p>Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, string given</p>
  </blockquote>