我有以下 xml 有效负载。
<ClientList>
<Client>
............................
....n number of elements....
............................
<EmployerList>
<Employer>
............................
....n number of elements....
............................
<LocationList>
<Location></Location>
<Location></Location>
<Location></Location>
<Employer>
............................
....n number of elements....
............................
<LocationList>
<Location></Location>
<Location></Location>
<Location></Location>
<Client>
............................
....n number of elements....
............................
<EmployerList>
<Employer>
............................
....n number of elements....
............................
<LocationList>
<Location></Location>
<Location></Location>
<Location></Location>
<Employer>
............................
....n number of elements....
............................
<LocationList>
<Location></Location>
<Location></Location>
<Location></Location>
位置具有 locationId 元素。根据我手头的输入 locationId,我只需要过滤位置。如何在不迭代/重新映射数千个其他元素(称为“n 个元素”)的情况下完全删除不匹配的位置元素