import os
import pickle as pkl
from gso import load_up_answers, load_up_questions

#for result in load_up_questions("How to write a bubble sort", "python"):
    #print result
    #break

#question_url = 'https://stackoverflow.com/questions/895371/bubble-sort-homework'

#with open("html_dump.pkl", 'wb') as myfile:
    #pkl.dump(load_up_answers(question_url), myfile)

html_dump = []
with open("html_dump.pkl", 'rb') as myfile:
    html_dump = pkl.load(myfile)

print html_dump

@@ -24,16 +24,39 @@
  as pkl%0A
+from lxml import etree%0A
 from gso
@@ -482,20 +482,184 @@
 e)%0A%0A
-print html_dump
+def wrapper_tag(xml_string):%0A    xml_string = %22%3Croot%3E%22+xml_string+%22%3C/root%3E%22%0A    return xml_string%0A%0Aroot = etree.fromstring(wrapper_tag(html_dump%5B0%5D%5B1%5D))%0Aprint etree.tostring(root)
 %0A

Create wrapper tag for SO html