So to build off of this question, Selecting from XML field where XML field = X, and using the same SQL Fiddle, http://sqlfiddle.com/#!3/7c0a0/5.
I can't seem to figure out how to grab the record that has both an item that has a FIELD with the value of 'Payment method' and has an item that has the NEWVALUE of 25.
I tried the following and it didn't return any results. I am assuming because it's looking for everything in the where clause in one of the nodes which doesn't exist.
SELECT
ID
FROM
T1
CROSS APPLY
XmlField.nodes('/ITEMS/ITEM') as XTbl(XItem)
WHERE
XItem.exist('FIELD[.="Payment method"]') = 1
and XItem.exist('NEWVALUE[.="25"]') = 1
What am I missing?