如何将XmlDocument转化为DataSet?
<AssignmentInfo>
<AttributeInfo>
<AttrType>DEPT_CODE</AttrType>
<AttrText>所属部门</AttrText>
<AttrValue>部门001</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>BTYPE</AttrType>
<AttrText>血型</AttrText>
<AttrValue>B型</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>SCODE</AttrType>
<AttrText>性别</AttrText>
<AttrValue>男</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>ECODE</AttrType>
<AttrText>学历</AttrText>
<AttrValue>本科</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>DECODE</AttrType>
<AttrText>学位</AttrText>
<AttrValue>学士</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>NACODE</AttrType>
<AttrText>民族</AttrText>
<AttrValue>汉族</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>PCODE</AttrType>
<AttrText>政治面貌</AttrText>
<AttrValue>群众</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>GRCODE</AttrType>
<AttrText>工人技术等级</AttrText>
<AttrValue>A级</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>JOBS_CODE</AttrType>
<AttrText>工种</AttrText>
<AttrValue>短工</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>LCCODE</AttrType>
<AttrText>用工类别</AttrText>
<AttrValue>类别001</AttrValue>
<valueDesc />
</AttributeInfo>
</AssignmentInfo>
以上为参数,,如何将这一段Xml转化为DataSet.
使用readxml不能实现。。
<AttributeInfo>
<AttrType>DEPT_CODE</AttrType>
<AttrText>所属部门</AttrText>
<AttrValue>部门001</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>BTYPE</AttrType>
<AttrText>血型</AttrText>
<AttrValue>B型</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>SCODE</AttrType>
<AttrText>性别</AttrText>
<AttrValue>男</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>ECODE</AttrType>
<AttrText>学历</AttrText>
<AttrValue>本科</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>DECODE</AttrType>
<AttrText>学位</AttrText>
<AttrValue>学士</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>NACODE</AttrType>
<AttrText>民族</AttrText>
<AttrValue>汉族</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>PCODE</AttrType>
<AttrText>政治面貌</AttrText>
<AttrValue>群众</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>GRCODE</AttrType>
<AttrText>工人技术等级</AttrText>
<AttrValue>A级</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>JOBS_CODE</AttrType>
<AttrText>工种</AttrText>
<AttrValue>短工</AttrValue>
<valueDesc />
</AttributeInfo>
<AttributeInfo>
<AttrType>LCCODE</AttrType>
<AttrText>用工类别</AttrText>
<AttrValue>类别001</AttrValue>
<valueDesc />
</AttributeInfo>
</AssignmentInfo>
以上为参数,,如何将这一段Xml转化为DataSet.
使用readxml不能实现。。
...全文
相关推荐
将xmlDocument转化成dataset
### 将xmlDocument转化成dataset在日常的软件开发工作中,我们经常需要处理各种格式的数据文件,其中XML(可扩展标记语言)作为一种广泛使用的数据交换格式,在数据存储、传输及解析方面发挥着重要作用
xml字符串转化Dataset
```csharp string datafile = "guest.xml"; XmlDocument xmldocument = new XmlDocument(); xmldocument.Load
XML与DataSet的相互转换类
最后,该方法返回转换后的DataSet对象。在这个方法中,我们使用了XmlDocument和StringReader两个类。
DataSet和XML深入编程PDF
本文介绍了在.NET环境中如何利用DataSet和XML进行数据处理,涵盖两者关系、XmlDocument类的使用、XPath查询、DataView过滤及XSLT转换等内容。同时讲解了XPath表达式
xml读取成DataSet 验证重复 并导出
xmlDoc = new XmlDocument(); xmlDoc.Load(xmlFilePath); // 将XML加载到DataSet DataSet dataSet = new DataSet


