I'm desperately trying to combining several filters in xpath. Assume my data looks like that:
<Table name="MyTable1">
<Item>
<Status date="2015-03-01" category="one/two">DELETE</Status>
<Old />
<Current>
<Field name="ID">1</Field>
<Field name="Title">This is my title</Field>
<Field name="Short_title">my short title</Field>
<Field name="Order">1</Field>
</Current>
</Item>
<Item>
<Status date="2015-03-01" category="one/two">EQUAL</Status>
<Old />
<Current>
<Field name="ID">2</Field>
<Field name="Title">here comes another title</Field>
<Field name="Short_title">another short one</Field>
<Field name="Order">2</Field>
</Current>
</Item>
</Table>
My wish is to access all "Current"-nodes that
- contain Status category "two"
- have a Status which does not contain "DELETE"
I tried to combine several questions asked on stackoverflow:
For instance one of my queries would have been:
/Table/Item[Status[[contains(@category,'two')] AND [not(contains('DELETE')]]/Current
Any ideas what could be a better approach?