Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAI don't know much about XML so I didn't wind up using the XML parse tool - just took a whack at it
10-line python solution, not counting imports and comments
from ayx import Alteryx
import pandas as pd
import xml.etree.ElementTree as ET
text = Alteryx.read("#1").iloc[0]['xml']
# "element tree" structure useful for XML / HTML
tree = ET.fromstring(text)
data = []
#walk through each taxon node
nodes = tree.findall('.//taxonpath')
for e in nodes:
source = e.findall('./source/langstring')[0].text
ent_text = e.findall('./taxon/entry/langstring')[0].text
data.append({'name':source,'value':ent_text})
df = pd.DataFrame(data)
Alteryx.write(df,1)
Here's my solution.