P
Paulo
How do I put the content returned from a WebService (XMLNode) into a
XmlDocument to save it as a .xml?
exportapedido ExpPedido = new exportapedido(); //WebService
XmlDocument XMLdoc = new XmlDocument();
try
{
XmlNode node1 = ExpPedido.ExportaPedido(719); //Calling webservice wich
returnes XMLNode
XMLdoc.ImportNode(node1, true);
XMLdoc.Save("test.xml"); //ERROR: This an invalid XML document. The
document does not have a root element.
catch (Exception err)
{
Response.Write("<script> alert('" + err.Message.Replace("'", "") +
"')</script>");
}
How to fix it: "ERROR: This an invalid XML document. The document does not
have a root element."
Thanks!
XmlDocument to save it as a .xml?
exportapedido ExpPedido = new exportapedido(); //WebService
XmlDocument XMLdoc = new XmlDocument();
try
{
XmlNode node1 = ExpPedido.ExportaPedido(719); //Calling webservice wich
returnes XMLNode
XMLdoc.ImportNode(node1, true);
XMLdoc.Save("test.xml"); //ERROR: This an invalid XML document. The
document does not have a root element.
catch (Exception err)
{
Response.Write("<script> alert('" + err.Message.Replace("'", "") +
"')</script>");
}
How to fix it: "ERROR: This an invalid XML document. The document does not
have a root element."
Thanks!