I am having troubles parsing the XML and profusion files. I have been using codes from stack overflow and stack abuse, and with both codes I am getting stuck at the "items" and "names" portion. I looked closely at the XML file and have come to the hypothesis that python is unable to detect the items. How should I fix this problem?
I took the code from this website:
I ran the following code.
tree = ET.parse('shhs1-200001-nsrr.xml')
root = tree.getroot()
for child in root:
and I got the following result:
What are you trying to do once you parse the XML annotation files?
I don't use python, but I did something in R a couple years ago: https://sleepdata.org/tools/mrueschman-xml-annotation-extractor
Another example in Ruby: https://sleepdata.org/tools/ruby-script-tutorial-05