I can't seem to figure out how to save an XML file that I generated with the DOM objects to my database..
Here is my PHP:
$xmlraw = $doc->saveXML();
$xmlQuery=sprintf("INSERT INTO xmlTestTable (XMLString) VALUES ('%s')", $xmlraw);
$result = mysql_query($xmlQuery);
I also tried:
$xmlQuery=sprintf("INSERT INTO xmlTestTable (XMLString) VALUES ('%s')", $doc->saveXML());
$result = mysql_query($xmlQuery);
Where $doc is the XML Document I created.
I am able to see the XML output in my browser when I do this:
echo $doc->saveXML();
There are no errors being outputted or anything...
My MySQL Column that this is being injected into is 'Long Text'
Thank you in advance!!