Xml 如何从BaseX控制台执行XQuery?
如何在模式下从Xml 如何从BaseX控制台执行XQuery?,xml,xpath,command-line-interface,xquery,basex,Xml,Xpath,Command Line Interface,Xquery,Basex,如何在模式下从BaseX运行XQuery 使用BaseX进行简单的读取和查询: thufir@dur:~/basex$ thufir@dur:~/basex$ basex [warning] /usr/bin/basex: Unable to locate /usr/share/java/jing.jar in /usr/share/java BaseX 9.0.1 [Standalone] Try 'help' to get more information. > > LIST
BaseX
运行XQuery
使用BaseX
进行简单的读取和查询:
thufir@dur:~/basex$
thufir@dur:~/basex$ basex
[warning] /usr/bin/basex: Unable to locate /usr/share/java/jing.jar in /usr/share/java
BaseX 9.0.1 [Standalone]
Try 'help' to get more information.
>
> LIST
Name Resources Size Input Path
-------------------------------------------------------
note 1 5208 /home/thufir/basex/note.data.xml
1 database(s).
>
> OPEN note
Database 'note' was opened in 65.07 ms.
>
> XQUERY db:open("note")//note
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
Query executed in 251.29 ms.
>
> RUN query.note.db.xq
Resource "/home/thufir/query.note.db.xq" not found.
>
> RUN query.note.xq
Resource "/home/thufir/query.note.xq" not found.
>
> exit
Have a nice day.
thufir@dur:~/basex$
从GUI工作:
路径固定:
thufir@dur:~/basex$
thufir@dur:~/basex$ basex
[warning] /usr/bin/basex: Unable to locate /usr/share/java/jing.jar in /usr/share/java
BaseX 9.0.1 [Standalone]
Try 'help' to get more information.
>
> RUN basex/query.note.db.xq
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
Query "query.note.db.xq" executed in 472.97 ms.
>
> exit
Enjoy life.
thufir@dur:~/basex$
thufir@dur:~/basex$
thufir@dur:~/basex$basex
[警告]/usr/bin/basex:在/usr/share/java中找不到/usr/share/java/jing.jar
BaseX 9.0.1[独立]
请尝试“帮助”以获取更多信息。
>
>运行basex/query.note.db.xq
托弗
贾尼
提醒
这个周末别忘了我!
472.97 ms中执行的查询“Query.note.db.xq”。
>
>出口
享受生活。
thufir@dur:~/basex$
(感谢Christian Gruen确认这是一个路径问题。)
thufir@dur:~/basex$
thufir@dur:~/basex$ basex
[warning] /usr/bin/basex: Unable to locate /usr/share/java/jing.jar in /usr/share/java
BaseX 9.0.1 [Standalone]
Try 'help' to get more information.
>
> RUN basex/query.note.db.xq
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
Query "query.note.db.xq" executed in 472.97 ms.
>
> exit
Enjoy life.
thufir@dur:~/basex$