I am trying to parse the following messages and store them in a list using python. How can I store the messages in a list?
I reached the id and the language by the following code, but I need to find the messages.
import xml.etree.ElementTree as ET
tree = ET.parse(filename)
root = tree.getiterator()
print (root[0].attrib)
<?xml version="1.0" encoding="UTF-8" standalone="no"?><author id="1aa8c430-853b-4bbc-b784-df4c88264ccd" lang="en">
<document><![CDATA[@username bahaha! unfortunately i'm not a tshirt person ]]></document>
<document><![CDATA[Mercy reunion at Olive Garden #traditions :) ]]></document>
<document><![CDATA[After 3 months of beating my head against a wall over this persuasion, I've finally had my "aha!" moment!! #progress! #improvement! ]]></document>
</author>