I have an XML file that I need formatted in a very specific manner, to wit:
<Transactions date="today's date">
<transaction>
<trans-line>
<UnitQty>1</UnitQty>
<Description>Item Name</Description>
<UnitPrice>3.49</UnitPrice>
</trans-line>
<trans-line>
.
.
.
</trans-line>
</transaction>
<transaction>
.
.
.
</transaction>
<Transactions>
This is to be derived from a DataGridView that looks like this:
UnitQty Description UnitPrice
1 Item Name 3.49
X YYYYYYYY Z
and so forth...
I've tried to research how to do this but I'm not getting any results that work.
Can anyone tell me how to write this DGV to an XML file as described and retrieve that XML back to the DGV?
I think I can get the XML to DGV part by using a DataSet (maybe).
<Transactions date="today's date">
<transaction>
<trans-line>
<UnitQty>1</UnitQty>
<Description>Item Name</Description>
<UnitPrice>3.49</UnitPrice>
</trans-line>
<trans-line>
.
.
.
</trans-line>
</transaction>
<transaction>
.
.
.
</transaction>
<Transactions>
This is to be derived from a DataGridView that looks like this:
UnitQty Description UnitPrice
1 Item Name 3.49
X YYYYYYYY Z
and so forth...
I've tried to research how to do this but I'm not getting any results that work.
Can anyone tell me how to write this DGV to an XML file as described and retrieve that XML back to the DGV?
I think I can get the XML to DGV part by using a DataSet (maybe).