public XElement ConvertDataTableIntoXElement(DataTable dtData)
{
XElement xElementConverted = null;
try
{
xElementConverted = new XElement("container");
using (XmlWriter xmlWriter = xElementConverted.CreateWriter())
{ dtData.WriteXml(xmlWriter, System.Data.XmlWriteMode.WriteSchema, true); }
}
catch (Exception ex)
{ }
return xElementConverted;
}
No comments:
Post a Comment
Put your comments here