One chance is to read the entire batch as a view and put your filter with WHEREat the end (as suggested in another answer). But, at least in my eyes, it’s more efficient to place the filter directly in XQuery.
If you can be sure that there is only one event, try this:
DECLARE @strAttributeID VARCHAR(1000) = '422'
DECLARE @strAttributeValue VARCHAR(1000) = '190gsm'
SELECT @XMLData.value(N'(/ArrayOfAttributeValueDO
/AttributeValueDO[(AttributeID/text())[1]=sql:variable("@strAttributeID")
and contains((AttributeValue/text())[1],sql:variable("@strAttributeValue"))]
/AttributeValue/text())[1]','nvarchar(max)');
, .nodes(), .value(), node:
SELECT Attr.value('(AttributeValue/text())[1]','nvarchar(max)')
FROM @XMLData.nodes(N'/ArrayOfAttributeValueDO
/AttributeValueDO[(AttributeID/text())[1]=sql:variable("@strAttributeID")
and contains((AttributeValue/text())[1],sql:variable("@strAttributeValue"))]') AS Searched(Attr);
: (SomeElement/text())[1] SomeElement[1]/text()[1] SomeElement[1]. ( )... : , . ... /text()