import xml.etree.ElementTree as ET
import re
-
tree = ET.parse('respons.xml')
response = root = tree.getroot()
print c.tag, c.attrib, len(c), c.text
station_names = [n[0].text for n in result]
+
+p = re.compile('.*B.*')
+matching_station_names = [n[0].text for n in result if p.match(n[0].text)]
+print matching_station_names
"""
conn = httplib.HTTPConnection(BASE_URL, PORT)
- conn.request("POST", "", xml_request, HEADERS)
+ conn.request("POST", BASE_URL, xml_request, HEADERS)
response = conn.getresponse()
print response.status, response.reason # 303 Found
xml_data = response.read()