我有以下 xml:
<?xml version="1.0" encoding="UTF-8"?>
<persons>
<person>
<phone type='home'>203-555-1212</phone>
<phone type='fax'>203-555-1212</phone>
<address type='home'>
<street>12 Main Street</street>
<city>Southbury</city>
<state>CT</state>
<zip>06488</zip>
</address>
<firstName>Charles</firstName>
<lastName>Smithington</lastName>
</person>
<person1>
<phone type='home'>58-99-44-999</phone>
<phone type='fax'>5788-9987-3365</phone>
<address type='home'>
<street>12 Main Street</street>
<city>Park Avenue</city>
<state>NY</state>
<zip>10025</zip>
</address>
<firstName>Mike</firstName>
<lastName>Shinoda</lastName>
</person1>
</persons>
在这里,我必须排除州为 CT 的人的地址字段,而包括州为 NY 的人的地址。