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

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -