title: XML parsing error: Expected token 'eof' found 'NAME'. How to load xml data in SQL?
body: <p>I tried to use SQL Server Management Studio to insert XML data into my table. And I always get parsing error. I wonder how I can pull the data from xml. Below is my code.</p>
  
  <pre><code>    --INSERT VALUES FROM XML IN TEMPORAL TABLE
      INSERT INTO #BAL
      (   BuyAppsLogID,
          loan_amount_desired
        )
  
      SELECT 
      @BuyAppsLogID,
      loan_amount_desired
  
      FROM OPENXML (@IdocPreVal,   '/tss_loan_request',2)
      WITH 
      (  
      loan_amount_desired VARCHAR(200) '/data name=loan_amount_desired/'
  
  
      ) ResultTable
  </code></pre>
  
  <p>Here is my sample xml data.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; 
  &lt;tss_loan_request&gt;
  &lt;data name="username"&gt;hadrian&lt;/data&gt;
  &lt;data name="bank_account_type"&gt;checking&lt;/data&gt;
  &lt;data name="bank_length_months"&gt;60&lt;/data&gt;
  &lt;data name="client_ip_address"&gt;172.56.20.152&lt;/data&gt;
  &lt;data name="client_url_root"&gt;www.emoneylenders.com&lt;/data&gt;
  &lt;data name="customer_id"&gt;CL530f6128a6e94&lt;/data&gt;
  &lt;data name="date_dob_d"&gt;22&lt;/data&gt;
  &lt;data name="date_dob_m"&gt;07&lt;/data&gt;
  &lt;data name="date_dob_y"&gt;1981&lt;/data&gt;
  &lt;data name="income_date1_d"&gt;07&lt;/data&gt;
  &lt;data name="income_date1_m"&gt;03&lt;/data&gt;
  &lt;data name="income_date1_y"&gt;2014&lt;/data&gt;
  &lt;data name="income_date2_d"&gt;21&lt;/data&gt;
  &lt;data name="income_date2_m"&gt;03&lt;/data&gt;
  &lt;data name="income_date2_y"&gt;2014&lt;/data&gt;
  &lt;data name="income_direct_deposit"&gt;true&lt;/data&gt;
  &lt;data name="income_frequency"&gt;biweekly&lt;/data&gt;
  &lt;data name="income_monthly"&gt;2100&lt;/data&gt;
  &lt;data name="income_type"&gt;employment&lt;/data&gt;
  &lt;data name="loan_amount_desired"&gt;300&lt;/data&gt;
  &lt;/tss_loan_request&gt;
  </code></pre>
  
  <p>I think it's probably because my path is wrong but I don't know what kind of path is correct. Please help!</p>