title: Parsing data into database from XML document
body: <p>I currently have this method in a standard web service: </p>
  
  <pre><code>[WebMethod]
          public void addGame(int GamePlayID, int @ParticipantID, int @GameVersionID, string Start, string End,string success)
          {
              SqlConnection oConn = new SqlConnection();
              oConn.ConnectionString = @"Data Source=SNICKERS\SQLEXPRESS;Initial Catalog=VerveDatabase;Integrated Security=True";
              oConn.Open();
              SqlCommand cmd = new SqlCommand();
              cmd.Connection = oConn;
              cmd.CommandType = CommandType.StoredProcedure;
              cmd.CommandText = "addGamePlay";
              cmd.Parameters.Add(new SqlParameter("@GamePlayID", SqlDbType.Int));
              cmd.Parameters["@GamePlayID"].Value = GamePlayID;
              cmd.Parameters.Add(new SqlParameter("@ParticipantID", SqlDbType.Int));
              cmd.Parameters["@ParticipantID"].Value = @ParticipantID;
              cmd.Parameters.Add(new SqlParameter("@GameVersionID", SqlDbType.Int));
              cmd.Parameters["@GameVersionID"].Value = @GameVersionID;
              cmd.Parameters.Add(new SqlParameter("@Start", SqlDbType.Time));
              cmd.Parameters["@Start"].Value = Start;
              cmd.Parameters.Add(new SqlParameter("@End", SqlDbType.Time));
              cmd.Parameters["@End"].Value = End;
              cmd.Parameters.Add(new SqlParameter("@success", SqlDbType.VarChar, 10));
              cmd.Parameters["@success"].Value = success;
              cmd.ExecuteNonQuery();
          }
  </code></pre>
  
  <p>This allows me to pass values accross to the database which are entered manually.However I want to be able to load the data from an XML document. How do I get data from this XML document to fill the variables in this method. Here is the XML document:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;anyType xmlns="http://tempuri.org/" xmlns:d1p1="http://www.w3.org/2001/XMLSchema-instance" d1p1:type="q1:string" xmlns:q1="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;NewDataSet&gt;
  &lt;Game&gt; 
  &lt;GamePlayID&gt;1&lt;/GamePlayID&gt;
              &lt;ParticipantID&gt;1&lt;/ParticipantID&gt; 
  &lt;GameVersionID&gt;1&lt;/GameVersionID&gt; 
  &lt;Start-Time&gt;PT0S&lt;/Start-Time&gt; 
  &lt;End-Time&gt;PT5H&lt;/End-Time&gt; 
  &lt;Success&gt;true &lt;/Success&gt; 
  &lt;/Game&gt;
  &lt;/NewDataSet&gt;
  &lt;/anyType&gt;
  </code></pre>