【发布时间】:2021-09-04 11:26:27
【问题描述】:
我从 api 作为 xml 得到以下响应
<ROOT>
<valid>1</valid>
<org_name> test org </org_name>
<count_of_vedios>3</count_of_vedios>
<total_length>351</total_length>
<Video1>
<Title>The Distinguished Gentleman</Title>
<Director>Jonathan Lynn</Director>
<Length>112 Minutes</Length>
<Format>DVD</Format>
<Rating>R</Rating>
</Video1>
<Video2>
<Title>Her Alibi</Title>
<Director>Bruce Beresford</Director>
<Length>94 Mins</Length>
<Format>DVD</Format>
<Rating>PG-13</Rating>
</Video2>
<Video3>
<Title>Chalte Chalte</Title>
<Director>Aziz Mirza</Director>
<Length>145 Mins</Length>
<Format>DVD</Format>
<Rating>N/R</Rating>
</Video3>
</ROOT>
我需要用信息填写 aspx 页面的一些字段:
org_name : 测试组织
count_of_vedios : 3
总长度:351
我还需要用节点中的 vedios 填充 gridview
标题 |导演 |长度 |格式 |评分 |
【问题讨论】:
-
有一个从 XML 创建数据集或 .NET 类的实用程序:docs.microsoft.com/en-us/dotnet/standard/serialization/…
-
这能回答你的问题吗? XmlDataSource in GridView