I have need to access specific data values from an ASP.NET DataSet. In my case, I am using an XML file as the data source. When the page loads, I have no problem loading the XML data into a DataGrid to display on the page (there are many examples of this on the Internet).
Code:
    protected void Page_Load(object sender, EventArgs e)
    {
        DataSet oDS = new DataSet();
        oDS.ReadXml(Request.PhysicalApplicationPath + "BenchMarks.xml");
        GridView1.DataSource = oDS;
        GridView1.DataBind();

    }
Now that the data has been loaded, I need to access specific values directly from it, and load them into floats. I believe that this might be accomplished using SqlDataAdapter, but I cannot figure out how to do this.
For example, it might be something like,
Code:
SqlDataAdapter ad = new SqlDataAdapter("SELECT * FROm  Categories",myConnection);
but I am uncertain what the table name would be, nor was it necessary to build a connection string to access the XML data file.
Here is a portion of my data file to show the problem of identifying a table name:
Code:
<?xml version="1.0" encoding="utf-8"?>
<BENCHMARKS>
  <ROW>
    <PROC>CABG</PROC>
    <DEATH> 2.3</DEATH>
    <STROKE>1.1</STROKE>
    <RENAL>3.5</RENAL>
    <RESP>9.2</RESP>
    <WOUND>0.3</WOUND>
    <REOP>5.0</REOP>
    <ANY>14.8</ANY>
    <STAY14D>5.6</STAY14D>
    <STAY6D>50.0</STAY6D>
  </ROW>
  <ROW>
    <PROC>AVREPL</PROC>
    <DEATH> 2.3</DEATH>
    <STROKE>1.1</STROKE>
    <RENAL>3.5</RENAL>
    <RESP>9.2</RESP>
    <WOUND>0.3</WOUND>
    <REOP>5.0</REOP>
    <ANY>14.8</ANY>
    <STAY14D>5.6</STAY14D>
    <STAY6D>50.0</STAY6D>
  </ROW>    
</BENCHMARKS>
In other words, I need to be able to execute an SQL statement like
SELECT DEATH FROM BENCHMARKS WHERE PROC = 'CABG'
How to make this work? Or is there a better way?