You can check multiple conditions inside the same square brackets:
/Location/Addr[State="TX" or State="AL" or State="MA"]
Or if you have a really long list, you can create a list of states and use the contains()
function.
/Location/Addr[contains('TX AL MA', State)]
This will work fine for two-letter state abbreviations. If you want to make it more robust for longer strings you could add some spaces on the ends and check for _TX_
, _AL_
, etc. (where the underscores are spaces).
/Location/Addr[contains(' TX AL MA ', concat(' ', State, ' '))]