You will have to use msxml:node-set to use the resulting node-set in a for-each loop.