将 xml 绑定到数据转发器控件
我有一个像这样的 xml 文件,
<ward> <pods>
<name>Pod A</name>
<direction>North</direction>
<beds>
<id>a1</id>
<id>a2</id>
<id>a3</id>
<id>a4</id>
<id>a5</id>
</beds> </pods> <pods>
<name>Pod B</name>
<direction>North</direction>
<beds>
<id>b1</id>
<id>b2</id>
<id>b3</id>
<id>b4</id>
<id>b5</id>
</beds> </pods> </ward>
我试图将名称作为列标题和床 -> id作为他们的孩子, 我根本不知道如何做到这一点,有什么帮助吗?
i am having a xml file like this
<ward> <pods>
<name>Pod A</name>
<direction>North</direction>
<beds>
<id>a1</id>
<id>a2</id>
<id>a3</id>
<id>a4</id>
<id>a5</id>
</beds> </pods> <pods>
<name>Pod B</name>
<direction>North</direction>
<beds>
<id>b1</id>
<id>b2</id>
<id>b3</id>
<id>b4</id>
<id>b5</id>
</beds> </pods> </ward>
i am trying to put the names as column header and beds-> id as their children,
i am not at all having a clue to do this, any help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试一下,看看您到底会得到什么:
如果显示错误 - 您可以手动遍历
dataSet.Tables
重新构造它(我相信你不能改变XML结构)
Try out this and see what exactly you will have:
If something displayed wrong - you can manually restructure it traversing
dataSet.Tables
(I believe you can't change XML structure)