I have a stored procedure that creates an XML document. I then have the following code:
using (SqlConnection con = new SqlConnection(_connectionString))
{
con.Open();
using (SqlCommand cmd = new SqlCommand("GetModuleInstallerManifestXML", con))
{
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@mod_name", SqlDbType.VarChar, 250)).Value = this.ModuleName;
using (SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection))
{
while (reader.Read())
{
manifestXmlList.Add(reader[]);
}
}
}
}
I need to add the xml data row by row into a list and then write that list to a file, how do I do this?