解析Android / Java SoapObject返回数据的最佳方法

时间:2013-04-17 07:36:50

标签: java android

我从SoapObject(Android / Java)返回了一些数据

final SoapObject result=(SoapObject)envelope.getResponse();
SoapObject so = (SoapObject) result.getProperty(0); 

这就是数据的样子:

  

anyType的{DocumentElement = anyType的{Tabela = anyType的{WER = 1; TYU = 0; NNN = 0;   ABC = 0; BBB = Napoje; }; Tabela = anyType的{WER = 201; TYU = 0; NNN = 0; ABC = 0;   BBB = Alkohole; }; Tabela = anyType的{WER = 501; TYU = 0; NNN = 0; ABC = 0;   BBB =披萨; }; Tabela = anyType的{WER = 601; TYU = 0; NNN = 0; ABC = 0; BBB = Desery;   };

我应该解析它(就像带有正则表达式的String)或者我可以更好地解决它?

1 个答案:

答案 0 :(得分:1)

我创建了一个用于解析SOAP Response的演示应用程序。此外,如果您想在XML响应中转换SOAP响应并解析也可以完成。结帐我的example from my github source