我正在从服务器请求以下 XML 文件:
<CreateAccount>
<Customer>ApiTest</Customer>
<CustomerLoginName>ApiTest</CustomerLoginName>
<Result>Success</Result>
<Reason>Country added</Reason>
<Result>Success</Result>
<Reason>Timezone added</Reason>
<Result>Success</Result>
<Reason>Request completely succeeded</Reason>
</CreateAccount>
我对请求的结果和最后一个原因感兴趣。如果出现错误,我将收到此 XML:
<CreateAccount>
<Customer>ApiTest</Customer>
<Result>Failed</Result>
<Reason>Request completely or partially failed.</Reason>
</CreateAccount>
如何处理相同的标签?我按照以下说明操作:http: //developer.android.com/training/basics/network-ops/xml.html