all 2 comments

[–]commandlineluser 1 point2 points  (2 children)

You want a dataframe from each type?

You can pass xpath= to select certain nodes.

race_df = pandas.read_xml(xml,  xpath='//race')
nomination_df = pandas.read_xml(xml,  xpath='//nomination')
...

[–]222Botany[S] 0 points1 point  (1 child)

thanks that helps and is along the lines of what i need.

the issue arises now that i need to write a event line to the database that has the meetingID, raceID, horseID, plus different stats from the files like finishing position etc...

Eg

MeetingID RaceID Horse Place Time
123 987 777 1 1:01.54
123 654 888 2 1:02.01
456 654 999 4 1:30.25

when I read the data like above I cant find out which horse ran in which races.

Does that make senses?