You can have multiple predicates e.g.
foo[predicate1][predicate2]
You can also use boolean operators 'and' or 'or' e.g.
foo[predicate1 and predicate2]
foo[predicate1 or predicate2]
As for a working snippet, you will need to post the input XML first to allow us the suggest an XPath expression specific to that input.
|