Using the DataSet Property of an XmlDataDocument

titlereview-yearreview-monthreview-dayusage-cost
Agenda20045104.90
Introduction20032172.75
Techniques20054229.5
Code Examples200412197.55
Summary2005272.80

Loaded XmlDataDocument.DataSet with c:\inetpub\wwwroot\articles\readwritexml\data\schema\slides-for-datadoc.xsd

Loaded XmlDataDocument with c:\inetpub\wwwroot\articles\readwritexml\data\slides-for-datadoc.xml

Bound GridView control to a table exposed by the XmlDataDocument.DataSet property

Applied filter '[usage-cost] > 4' and sorted rows by the [usage-cost] column

XML file created using the GetElementFromRow method, file contains:

<?xml version="1.0" encoding="utf-16"?>
<root>
<!--XML extracted from DataSet table-->
<slide><title>Agenda</title><review-year>2004</review-year><review-month>5</review-month><review-day>10</review-day><usage-cost>4.90</usage-cost></slide>
<slide><title>Code Examples</title><review-year>2004</review-year><review-month>12</review-month><review-day>19</review-day><usage-cost>7.55</usage-cost></slide>
<slide><title>Techniques</title><review-year>2005</review-year><review-month>4</review-month><review-day>22</review-day><usage-cost>9.5</usage-cost></slide>
</root>

[view source]     ©2005 Dave And Al, Stonebroom Limited, England.