目前我正在使用 ksoap2,但想使用行业中的任何标准方法。我可以访问“简单示例”(下)并使用 ksoap2 将诸如“弗兰克”之类的值写入日志没有问题,但复杂示例(下)让我难过。我已经看到很多示例显示我称之为“单级”的 xml,但没有一个像复杂示例那样遍历到 2 个或更多级别。
有什么帮助吗?
---简单示例---------------------------------------
<Category xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org /2001/XMLSchema-instance" xmlns="http://ACCUMobileWS.org/">
<CategoryId>99</CategoryId>
<Name>Frank</Name>
<Description>Prison Break</Description>
</Category>
<Category>
--------复杂样本----------------------------- -
<SuperCategory xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ACCUMobileWS.org/">
<Categories>
<Category>
<CategoryId>99</CategoryId>
<Name>Frank</Name>
<Description>Prison Break</Description>
</Category>
<Category>
<CategoryId>101</CategoryId>
<Name>Jim</Name>
<Description>Breakig Bad</Description>
</Category>
</Categories>
</SuperCategory>
问题是进入第二级,即“类别”数组