XML Checkpoint from SQL Server Database
I am looking to perform a checkpoint verification against XML that I have extracted from a SQL Server database. I have created a JScript function to extract the data from the database and have created an XML object in the stores to save the baseline copy, however, I am unsure how to pass the XML into the checkpoint. Can I just save the data into a project variable and use this for the checkpoint?
I have been trying to save the SQL query into a file by passing the results of my database query function into the following:
function SaveXML(XMLFile)
{
var File = Storages.XML(XMLFile);
File.SaveAs("C:\\XMLTest.xml");
}
But this is just saving a blank XML document (I have already verified the output from the database to ensure that this is being passed across):
<?xml version = "1.0" encoding="ISO-8859-1"?>
<XMLStorage></XMLStorage>
Apolgoies if I am missing something obvious - I'm new to scripting!
Thanks for your help, I have managed to achevie this by saving the XML returned from the database using:
aqFile.WriteToTextFile
I am then doing a standard XML checkpoint within the keyword test.