Need Help, Returning DOCTYPE with web service XML -
09-04-2007
, 11:54 AM
I cannot find how to do this, hopefully someone can help and soon!
I have a web service (in c#) that returns and XML document, but the
Doctype is stripped out on the return and I cannot figure out why.
Here is a striped down demo.
[WebMethod]
public XmlDocument cxmlsetup()
{
XmlDocument sendxml = new XmlDocument();
string xmlstring= "" +
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<!DOCTYPE cXML SYSTEM \"http://xml.cxml.org/schemas/cXML/1.2.011/
cXML.dtd\">" +
"<test>test here</test>";
sendxml.LoadXml(xmlstring);
return sendxml;
}
But when the XML is returned it has the xml line and the test line no
Doctype. When debugging I see the doctype is listed in the sendxml
object but what can I do to get it to return that with the reset of
the xml via the webservice?!!?
Thanks |