相关疑难解决方法(0)

使用C#和XDocument/XElement来解析Soap响应

以下是来自SuperDuperService的示例soap响应:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <MyResponse xmlns="http://mycrazyservice.com/SuperDuperService">
            <Result>32347</Result> 
        </MyResponse>
    </soap:Body>
</soap:Envelope>
Run Code Online (Sandbox Code Playgroud)

出于某种原因,当我试图抓住"结果"的后代或元素时,我得到了空.它与命名空间有关吗?有人可以提供从中检索结果的解决方案吗?

c# xml parsing soap

5
推荐指数
1
解决办法
3万
查看次数

标签 统计

c# ×1

parsing ×1

soap ×1

xml ×1