【问题标题】:showind data from xml files in c# with more flexibile way以更灵活的方式在 C# 中显示来自 xml 文件的数据
【发布时间】:2011-09-08 19:20:49
【问题描述】:

我想显示来自 xml 文件的数据,例如酒店套餐的 xml api。但是我有一些方法,例如xmldocument()... 仍然怀疑使用最有效的方法来表示具有良好编程技术的酒店数据。这是一个门户网站,我必须从远程 xml 文件中获取数据。

<results>
    <content>
        <fields>
            <field name="headlines"> This is headline </field>
            <field name="text"> This is text </field>
            <field name="url"> This is url </field>
        <fields>
    </content>
    <content>
        …
    </content>
    …
</results>

【问题讨论】:

  • 问题是什么?这和 xmlhttprequest 有什么关系?

标签: c# xml xmlhttprequest


【解决方案1】:

Linq to XML 是一个很好的起点。除了那个 MSDN 页面,还有一个 CodeProject 教程解释了如何使用 Linq to XML。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-06-23
    • 1970-01-01
    • 1970-01-01
    • 2012-06-17
    • 1970-01-01
    • 2020-03-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多