key meh

key meh

  • NA
  • 13
  • 0

How to send html response in xmlelement web method

Jul 9 2015 2:08 AM
I want to send html response in xmlelement web method. But When I run in console application to send html response, it raises error. It is not recognized html in xml response. 
 
public XmlElement GenerateHTMLResponse()
 
ReqErrxml = "<?xml version='1.0' encoding='utf-8' ?>" +
"<DATA>" +
"<HTMLCODE>" + html_code + "</HTMLCODE>" +
"</DATA>";
 
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(ReqErrxml);
return xmlDoc.DocumentElement;
 
 }
 
 Request you to guide me for this problem.