我从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 =纳波耶; }; Tabela = anyType {WER = 201; TYU = 0; NNN = 0; ABC = 0;
BBB =烷孔; }; Tabela = anyType {WER = 501; TYU = 0; NNN = 0; ABC = 0;
BBB =披萨; }; Tabela = anyType {WER = 601; TYU = 0; NNN = 0; ABC = 0; BBB = Desery;
};


我应该解析它(就像使用Regex的String一样),还是可以用更好的方法来解析?

最佳答案

我创建了一个演示应用程序来解析SOAP响应。另外,如果要将SOAP响应转换为XML响应并进行解析,也可以这样做。签出我的example from my github source

07-28 12:42