听起来我需要某种类型的 XML 处理器
看起来有一个名为 Saxon 的程序,我可以用它来运行 XQuery
当我尝试时这个网站我得到的例子
Error: Could not find or load main class net.sf.saxon.Query
我不知道如何从撒克逊包我下载了。
我想知道除了这个 java 包之外是否还有更简单的选项可以从命令行运行 XQuery?我想做的就是使用“Select where type=”something””之类的命令处理 xml 文件。
BaseX提供 XQuery 3.0 支持,并与封装调用 Java 的脚本打包在一起,包括设置类路径:
$ basex --help
BaseX 8.5.3 [Standalone]
Usage: basex [-bcdiIoqrRstuvVwxXz] [input]
[input] XQuery or command file, or query string
-b<pars> Bind external query variables
-c<input> Execute commands from file or string
-d Activate debugging mode
-i<input> Assign file or database to context
-I<input> Assign input string to context
-o<output> Write output to file
-q<expr> Execute XQuery expression
-r<num> Set number of query executions
-R Turn query execution on/off
-s<pars> Set serialization parameter(s)
-t[path] Run tests in file or directory
-u Write updates back to original files
-v/V Show (all) process info
-w Preserve whitespaces from input files
-x Show query plan
-X Show query plan before/after compilation
-z Skip output of results
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)