I hope I have chosen the right forum.
I have a dataset object with a single table that comes to me from a common custom GetDS method. I need to pass the XML to another process (chunked as byte array). Everything works for me, but in XML there are no some attributes that expect consumption processes.
I create a dataset object and can control the name of the TableName (root element) and row as follows:
da.Fill(ds, "Foo")
ds.DataSetName = "FooUpload"
I am using the GetXML method to serialize to XML, which is as follows:
<?xml version="1.0" standalone="yes" ?>
<FooUpload>
<Foo>
<FooMasterID>483</FooMasterID>
<Country>27</Country>
<PaymentCode>ANN</PaymentCode>
<Amount>132</Amount>
<PaidDate>2012-12-31 00:00:00</PaidDate>
<PaidBy>FooServices</PaidBy>
</Foo>
</FooUpload>
The calling process is waiting
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<FooUpload **ClientCode="FOOO" RecordCount="1" CreateDate="2008-12-09T15:02:18.920" CreateUser="valli"**>
<Foo>
<FooMasterID>483</FooMasterID>
<Country>27</Country>
<PaymentCode>ANN</PaymentCode>
<Amount>132</Amount>
<PaidDate>2012-12-31 00:00:00</PaidDate>
<PaidBy>FooServices</PaidBy>
</Foo>
</FooUpload>
Pay attention to the attributes of the FooUpload element. This node is the name of the DataTable in the DataSet.
, XMLSerializer . MappingType.Attribute, , , TableName .
, , , , XML.
( )!