C# 如何从webservice向jQueryAjax调用返回xml数据

C# 如何从webservice向jQueryAjax调用返回xml数据,c#,jquery,xml,ajax,dhtml,C#,Jquery,Xml,Ajax,Dhtml,这是我对webservice-JsonWebService.asmx文件的ajax调用 $.ajax({ type: "POST", async: false, url: "/blkseek2/JsonWebService.asmx/GetList", data: keyword2, conte

这是我对webservice-JsonWebService.asmx文件的ajax调用

 $.ajax({
                    type: "POST",
                    async: false, 
                    url: "/blkseek2/JsonWebService.asmx/GetList",
                    data: keyword2,
                    contentType: "application/xml; charset=utf-8",
                    success: ajaxCallSucceed,
                    dataType: "xml",
                    failure: ajaxCallFailed
                });
这是我成功的方法,我将如何在成功方法中捕获xml响应

function ajaxCallSucceed(response) {
    alert(response.d);
    /// here i need to write code to capture response xml doc file
}
这是我在webservice jsonwebservice.asmx.cs文件中编写的代码,我能够完全成功地创建xml,但我发现将xml返回到ajax调用时有困难

[WebMethod]
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
    public XmlDocument GetList(string keyword1, string streetname, string lat, string lng, string radius)
    {
        XmlDocument xmldoc= CreateXML( keyword1,streetname,lat,lng,radius);



        return xmldoc;

    }

按以下方式更改web方法,然后重试:

[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
public XmlDocument GetList(string keyword1, string streetname, string lat, string lng, string radius) {
    XmlDocument xmldoc = CreateXML(keyword1, streetname, lat, lng, radius);
    return xmldoc;
}

按以下方式更改web方法,然后重试:

[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
public XmlDocument GetList(string keyword1, string streetname, string lat, string lng, string radius) {
    XmlDocument xmldoc = CreateXML(keyword1, streetname, lat, lng, radius);
    return xmldoc;
}