【问题标题】:Return all Documents in XML DataBase返回 XML 数据库中的所有文档
【发布时间】:2015-11-02 12:01:54
【问题描述】:

在关系数据库中,我们可以像这样查询所有表:

select table_name from all_all_tables ;

select tname from tab;

如何使用 XQuery/XPath 从 Sedna XML 数据库中返回所有 xml 文件,就像我们在关系数据库中查询表一样?

如果我可以使用函数,我在哪里可以找到内置 XML 函数的文档。

【问题讨论】:

    标签: xml xpath xquery flower sedna


    【解决方案1】:

    根据http://www.sedna.org/progguide/ProgGuidesu8.html#x14-580002.5.6,听起来好像$documents 为您提供“所有独立文档、集合和集合中的文档”。

    【讨论】:

    • 谢谢你的回复,这就是我要找的,我试过 doc('$documents') 它返回系统文件的文件,如 $db_security_data 和 $modules。我也为用户文档构建了它。我的问题是我可以通过只显示用户文档来控制它吗?
    • 用户文档不是从“$”开始的。因此,XPath 可用于过滤:doc('$documents')/documents/(document | collection)[not(starts-with(@name, '$'))]
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-03
    • 1970-01-01
    相关资源
    最近更新 更多