how to load multiple xml files with saxon

前端 未结 1 642
借酒劲吻你
借酒劲吻你 2021-01-27 19:47

I want to use saxon for xpath queries but i don\'t know to load multiple xml files.

I\'m trying to use saxon with command line from windows

I read in saxon manua

相关标签:
1条回答
  • 2021-01-27 20:50

    Use the standard XPath 2.0 function collection().

    The documentation for the Saxon-specific implementation of collection() is here.

    You can use the standard XPath 2.x collection() function, as implemented in Saxon 9.x

    The Saxon implementation allows a search pattern to be used in the string-Uri argument of the function, thus you may be able to specify after the path of the directory a pattern for any filename starting with report_ then having two other characters, then ending with .xml.

    Example:

    This XPath expression:

    collection('file:///c:/?select=report_*.xml')
    

    selects the document nodes of every XML document that resides in c:\ in a file with name starting with report_ then having a 0 or more characters, then ending with .xml.

    0 讨论(0)
提交回复
热议问题