English 中文(简体)
数据单如何知道如何从Xml文档中分离分子?
原标题:How does a DataSet know how to parse elements from xml files?

首先,我告诉我的数据Set如何通过Xsd文档解释xml。 问题的xml部分应当是钥匙ValuePair, 即我xsd的腐蚀体线。

<xs:element name="MyKeyValuePair" msdata:DataType="System.Collections.Generic.KeyValuePair`2[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" type="xs:anyType" />

The xsd is loaded to the DataSet as follows:

myDataSet.ReadXmlSchema(new StringReader(myXsdString));

这本书的细微可核实,该栏的数据类型是正确的(我有一些插图,有些是双倍,有些是系统)。 准则等,当然还有我的钥匙ValuePair。 然后,我装上Xml和

myDataSet.ReadXml(new StringReader(myXmlString));

xml喜欢

<DataSet>
  <DataTable>
    <MyGuid>8F6FC345-5362-4518-B652-0CC3AD54901E</MyGuid>
    <MyKeyValuePair>[67b7fdd1-2079-4311-a7a3-cd2fb0b31384, myValue]</MyKeyValuePair>
    <MyBool>0</MyBool>
  </DataTable>
</DataSet>

所有类型都是正确的,但显然,数据Set的斜线知道如何划分通用钥匙ValuePair。 我如何告诉数据组如何划分具体类型? 我的猜测是使用某种类型的变压器,但如何确切? Thanx

最佳回答

Ok说,使用型商号的商号是完全错误的。 该数据表对实施九千五百五千三千五百五千三千三千三千三千三千五百五百五千三千三千三千三千三千三千三千三千三千五百五千三千三千三千三千三千三千五百五千三千三千三千五百五千三千三千三千三千三千三千三千五百五千三千三千三千三千三千三千三千三千三千五百五千五千五百五百千五千五千五千五千五千五千五百千五千五千五千五千五千五千五千五千五千五千五千五千五千五百千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五千五百 因此,采用通用钥匙ValuePair, 即自行实施,执行可乘飞机的界面。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签