Basically, this returns empty labels:
let $report := fn:doc('/db/junitReports/Report.xml')
return <label>{$report//testResult/text()}</label>
Report.xml:
<junit>
<interfaceName>InterfaceName</interfaceName>
<reportDate>2016-06-01</reportDate>
<testResult>failure</testResult>
</junit>
However, it shows entire xml when xPath to a particular element is not used:
let $report := fn:doc('/db/junitReports/Report.xml')
return <label>{$report}</label>
Which means that the file is accessible from the db.
I found a post where it was fixed by updating exist db to later version, but I am on the latest 2.1.2