c# - XMLDocument to xml file -
in web services sending xml document using code,
xmldocument doc = new xmldocument(); doc.loadxml(mybigdata.serialize()); return result = doc.documentelement;
now in c# console app calling web method using,
xmlelement returneddatafromwebmethod = mywbsercvices.webmethod();
now how can convert xml element xml file e.g. in c drive can see if xml document document, instead of going through using foreach(xmlnode)
you may try this:
var doc = new xmldocument(); var node = doc.importnode(returneddatafromwebmethod, true); doc.appendchild(node); doc.save("output.xml");
Comments
Post a Comment