Using this code as a base, I can use this example as an AND for multiple criteria, using multiple INNER JOINs:
Declare @Ids varchar(50)
Set @Ids = '1,2,3,5,4,6,7,98,234'
declare @Levels varchar(50)
set @levels='0,3'
declare @XMLLevels XML
SET @XMLLevels = CAST('<i>' + REPLACE(@Levels, ',', '</i><i>') + '</i>' AS XML)
DECLARE @XML XML
SET @XML = CAST('<i>' + REPLACE(@Ids, ',', '</i><i>') + '</i>' AS XML)
SELECT a.*
FROM
[AdventureWorks2012].[HumanResources].[Employee] a
INNER JOIN @XML.nodes('i') x(i)
ON a.[BusinessEntityID] = x.i.value('.', 'VARCHAR(MAX)')
INNER JOIN @XMLlevels.nodes('i') y(i)
ON a.[OrganizationLevel] = y.i.value('.', 'VARCHAR(MAX)')
I can't seem to work out what joins I would need for an OR function