G
Guest
How can I add an XML Declaration and root element to an XmlDocument after it
has been loaded?
Here is the code...
SqlCommand cmd = cnn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText= "SELECT ID, Desc FROM products FOR XML AUTO, ELEMENT";
XmlReader xr = cmd.ExecuteXmlReader();
XmlDocument xd = new XmlDocument(xr);
xr.Close;
....at this point I would like to add an XML Declaration and root element
nodes, but I am unsure how...
has been loaded?
Here is the code...
SqlCommand cmd = cnn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText= "SELECT ID, Desc FROM products FOR XML AUTO, ELEMENT";
XmlReader xr = cmd.ExecuteXmlReader();
XmlDocument xd = new XmlDocument(xr);
xr.Close;
....at this point I would like to add an XML Declaration and root element
nodes, but I am unsure how...