【发布时间】:2020-06-07 10:36:51
【问题描述】:
我有以下 xml 响应数据。现在我需要使用 C# 控制台应用程序显示 ProjectName 和 MigrationStatus。我是 C# 新手,请指导我从 xml 节点列表中获取字段名称。我已经尝试了下面的代码,但混淆了很多。 提前致谢
XML 响应代码:
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://URL"
<id><<URL>></id>
<title type="text">Projects</title>
<updated>2020-06-07T06:24:57Z</updated>
<link rel="self" title="Projects" href="Projects" />
<entry>
<id><<URL>>(guid'86c492af-8c63-ea11-b119-00155d6c5103')</id>
<category term="ReportingData.Project" scheme="<<URL>>" />
<link rel="edit" title="Project" href="Projects(guid'86c492af-8c63-ea11-b119-00155d6c5103')" />
<title />
<updated>2020-06-07T06:24:57Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:NOde1>BULLL</d:ProjectName>
<d:NOde2>DOM</d:NOde2>
</m:properties>
</content>
</entry>
</feed>
【问题讨论】:
-
你提到了代码,你还在编辑问题吗?
-
这能回答你的问题吗? printing list of xml nodes in c#
-
到目前为止,您是否尝试过 C# 中的任何东西?