Here is the related post around using loops to pass flow variables into xpath node;
Xpath and flow variables - set cell types via flow variable - KNIME Extensions - KNIME Community Forum