嗨所以我有一点问题我有一个xml文件我需要读取所有数据但是我对xml不好
我有google它并找到了获取正常xml文件的方法但事情是我不知道如何获取xml文件我需要我会在它下面放一个小副本
<items>
<batch>
<id>1</id>
<subatch>
<tracking>110f6ty</tracking>
<name>toysrus-package-110f6ty</name>
<location>glasgow</location>
</subatch>
<subatch>
<tracking>110f6ty</tracking>
<name>toysrus-package-110f6ty</name>
<location>glasgow</location>
</subatch>
</batch>
<batch>
<id>2</id>
<subatch>
<tracking>110f6ty</tracking>
<name>toysrus-package-110f6ty</name>
<location>glasgow</location>
</subatch>
<subatch>
<tracking>110f6ty</tracking>
<name>toysrus-package-110f6ty</name>
<location>glasgow</location>
</subatch>
</batch>
</items>
我如何通过其id获取eatch“Batch”然后在此批次中获取每个“Subatch”,然后以下列格式读出每个“Subatch”的内容
tracking -> name -> location
感谢您的帮助,如果我有阅读障碍症的拼写错误,我很抱歉