If you want to query an XML file, at first sight, you must use a mapping. But it's like using a tank to kill a mouse !
Fortunately, we can do better with scripting.
The following example shows how to open an XML file and how to query it with an XPath expression :
factory = javax.xml.parsers.DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
builder = factory.newDocumentBuilder();
doc = builder.parse("%x{md:paramValue($this,'XML_FILE_NAME')}x%");
xpathFactory = javax.xml.xpath.XPathFactory.newInstance();
xpath = xpathFactory.newXPath();
expr = xpath.compile("%x{md:paramValue($this,'XPATH_EXPRESSION')}x%");
result = expr.evaluate(doc,javax.xml.xpath.XPathConstants.STRING);
__ctx__.publishVariable("./QUERY_RESULT",result);