【问题标题】:BaseX GUI and MongoDBBaseX GUI 和 MongoDB
【发布时间】:2013-05-18 14:04:27
【问题描述】:

BaseX 专注于存储、查询和可视化大型 XML 和 JSON 文档和集合。

有没有办法查询MongoDB文档并使用BaseX可视化能力?

【问题讨论】:

  • 你试过JSON模块了吗?
  • @WiredPrairie 不可以。它可以向 MongoDB 服务器发送查询吗?
  • 不是直接的(至少不是直接的)。它确实是为 XML 设计的,因此需要将 JSON 转换为 XML。 docs.basex.org/wiki/JSON_Module
  • 使用像 WiredPrairie 提议的 JSON 模块,看看不同的MongoDB-Rest-Wrappers proposed in this question,这样你就可以使用 BaseX 的 HTTP 模块连接到 MongoDB。
  • 只是为了补充这一点。我们目前正在研究 XQuery MongoDB 模块的规范:expath.org/spec/mongo

标签: json mongodb user-interface basex


【解决方案1】:

我来帮忙吧,资料来自:http://docs.basex.org/wiki/JSON

示例:使用简单对象和数组转换 JSON 字符串 查询:

json:parse('{
 "title": "Talk On Travel Pool",
 "link": "http://www.flickr.com/groups/talkontravel/pool/",
 "description": "Travel and vacation photos from around the world.",
 "modified": "2014-02-02T11:10:27Z",
 "generator": "http://www.flickr.com/"
 }')

结果:

 <json type="object">
   <title>Talk On Travel Pool</title>
   <link>http://www.flickr.com/groups/talkontravel/pool/</link>
   <description>Travel and vacation photos from around the world.    </description>
   <modified>2014-02-02T11:10:27Z</modified>
   <generator>http://www.flickr.com/</generator>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-18
    • 1970-01-01
    • 2017-04-29
    相关资源
    最近更新 更多