title: Python, insert XML data to sqlite3
body: <p>Im trying to pull some XML from a URL, parse it and store the entries in an sqlite3 database, Im trying numerous things and all are failing.  Codde so far:</p>
  
  <pre><code>#!/usr/bin/env python
  
  from urllib2 import urlopen
  import gc
  import xml.etree.ElementTree as ET
  import sqlite3
  
  rosetta_url = ("https://boinc.bakerlab.org/rosetta/team_email_list.php?teamid=12575&amp;account_key=Y&amp;xml=1")
  
  root = ET.parse(urlopen(rosetta_url)).getroot()
  cpids = [el.text for el in root.findall('.//user/cpid')]
  print cpids
  
  conn = sqlite3.connect("GridcoinTeam.db")
  c = conn.cursor()
  c.execute('''CREATE TABLE IF NOT EXISTS GRIDCOINTEAM (cpid TEXT)''') 
  c.executemany("INSERT INTO GRIDCOINTEAM VALUES (?);", cpids)
  conn.commit()       
  conn.close()
  
  conn = sqlite3.connect("GridcoinTeam.db")
  c = conn.cursor()
  cpids = c.execute('select cpid from GRIDCOINTEAM').fetchall()
  conn.close()
  
  print cpids
  
  gc.collect()
  </code></pre>
  
  <p>Im getting the error:</p>
  
  <pre><code>Incorrect number of bindings supplied. The current statement uses 1, and there are 32 supplied.
  </code></pre>
  
  <p>I tried making the insertion tuples by changing to</p>
  
  <pre><code>c.executemany("INSERT INTO GRIDCOINTEAM VALUES (?);", (cpids, ))
  </code></pre>
  
  <p>but that just gives:</p>
  
  <pre><code>Incorrect number of bindings supplied. The current statement uses 1, and there are 3289 supplied.
  </code></pre>
  
  <p>The XML extract is in the form ['5da243d1f47b7852d372c51d6ee660d7', '5a6d18b942518aca60833401e70b75b1', '527ab53f75164864b74a89f3db6986b8'], but there are several thousand entries.</p>
  
  <p>Thanks.</p>