How to store complete xml with their tags in single row of sql table (php,sql)

I am working on an xml and finally I want to save the xml output in a table inside single row. How can I save it? When I am fetching the output it is shown in the print array, but not showing in the query part and not inserting. Can anyone please help with it?


 $xmlDoc = new DomDocument('1.0');
 $xmlDoc->xmlStandalone = true;
 $xmlDoc->encoding = "UTF-8";
 //xml values are added here- Can't show
 $xmlDoc->formatOutput = true; 

Query part:-

$sql_query = "insert into                    
xml(order_id,xml_text,header,date_add,date_upd,post_response)    values(".$order_id.",".$xml_output.",'','".$cur_time."','".$cur_time."',
                ON DUPLICATE KEY UPDATE date_updated='".$cur_time."' , xml_text = '".$xml_output."'";
                $result_xml = Db::getInstance()->Execute($sql_query);