import urllib
from xml.dom import minidom
doc = '2009-04-09_125542.xml'
url = 'http://dev.electrostallion.com/archive/wave_data/' + doc
xml_data = minidom.parse(urllib.urlopen(url))
S = []
arraysFound = 0
for a in xml_data.childNodes:
for b in a.childNodes:
if b.nodeName == "dict":
for c in b.childNodes:
if c.nodeName == "array":
if arraysFound == 2:
for d in c.childNodes:
if d.nodeName == "array":
x = float(d.childNodes[1].firstChild.data)
y = float(d.childNodes[3].firstChild.data)
S.append((x,y))
else:
arraysFound = arraysFound + 1
Sp = list_plot(S,rgbcolor=(.5,.5,.5))
show (Sp, figsize=[25,5])