将关系数据库数据表示为 XML 并使用 XPath 获取结果

发布于 2024-09-01 18:19:15 字数 187 浏览 1 评论 0原文

我们有一个包含一些数据的关系数据库,我们需要通过 XML Web 服务提供数据库的内容。我们还必须使用户能够使用 XPath 获取部分 XML 表示形式(之后可能还需要通过 XQuery 使用数据的 XML 表示形式间接修改数据)。在 C# 中是否有一种简单的方法可以实现这一目标?用户将知道数据的 XML 模式。

网络搜索的关键字也很受欢迎。

we have a relational database with some data and we need to offer the content of the database via XML web services. We also have to enable users to get parts of the XML representation using XPath (also later there may be a need to modify data indirectly using XML representation of the data with XQuery). Is there a simple way to achieve this in C#? The user will be known XML schema of the data.

Keywords for web search also appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

倒数 2024-09-08 18:19:15

阅读 OData ;)比糟糕的 Web 服务好得多。 .NET 中的完整工具支持(集成了 LINQ),它是通过智能 Web 服务公开数据的语义方式。

Read up on OData ;) A lot better than bad web services. Full tooling support in .NET (LINQ integrated) it is a semantical way to expose data via intelligent web services.

惯饮孤独 2024-09-08 18:19:15

尽管我找不到太多数据,但我发现了一些方法。

一种是使用返回 XML 的 SQL 查询,另一种是使用具有某些 XML 处理可能性的 DataSet 类。 DataSet 还支持 XPath 查询。

There are a few ways I discovered, although I couldn't find much data.

One is to use an SQL query which returns an XML, the other is to use DataSet class with some of it XML processing possibilities. DataSet also supports XPath queries.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文