如何将数据从Xml插入到Dataset.Xsd vb.net?

时间:2012-12-06 08:44:01

标签: vb.net

我创建了一个名为Dataset1.xsd的数据集xsd,以及名为purchase.xml的xml架构

purchase.xml:

<?xml version="1.0" encoding="Windows-1252"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="DataSet1">
<xs:complexType>
<xs:sequence>
<xs:element name="purchase">
<xs:complexType>
<xs:sequence>
<xs:element name="kode_purchase" type="xs:string" />
<xs:element name="date_purchase" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Dataset1.xsd:

购买|

kode_purchase | date_purchase |

这是我的代码形式:

Dim stream As System.IO.Stream = System.Reflection.Assembly.GetExecutingAssembly()。GetManifestResourceStream(“purchase.xml”) dataset11.ReadXml(stream,XmlReadMode.IgnoreSchema) MSGBOX(dsParents11.purchase.Rows.Count) 的问题: 为什么值始终为0?

0 个答案:

没有答案