筛选XML文件并在VB .NET中的datagridview中显示 [英] Filter an XML file and present in datagridview in VB .NET

查看:69
本文介绍了筛选XML文件并在VB .NET中的datagridview中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个XML文件,其中包含两个主要节点,即位置"和地址".两者之间有一个共同的ID分母.问题在于位置是XML文件的第一部分,而地址是XML的第二部分.所以 我想将它们全部读入数据表或数据集,然后一起显示位置ID和地址ID(以及另一个字段),以便用户可以编辑另一个字段.那么,如何读取这样的XML文件并进行拆分或解析,以使我有意义 包含两个主要部分的XML文件中的ID上连接的字段?我想我必须先将位置(ID)读到数据表中,然后再读取地址ID,并将它们匹配并加入到第一个位置字段中.有没有人有这样的经验?

I have an XML file with two main nodes, "Location" and "Address". There is a common denominator of ID between the two. The problem is the locations are the first part of the XML file and the addresses are the 2nd part of the XML. So I want to read it all into a Datatable or Dataset and then present the Location ID and the Address ID (and another field) together so that the user can edit this other field. So how do I read in such an XML file and split it or parse it so that I have meaningful fields joined on IDs from an XML file that has 2 main sections? I think I have to read the Locations (IDs) in first to a datatable and then the Addresses IDs and match and join them to the first location fields. Does anyone have such experience?

推荐答案

你好,

请张贴XML文件的示例,否则我们只能猜测应该做什么.使用代码按钮并将其格式设置为XML.

Pease post an example of the XML file, otherwise we can only make guesses at what should be done. Use the code button and format as XML.


这篇关于筛选XML文件并在VB .NET中的datagridview中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆