Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from xml.dom import minidom
- xmldoc = minidom.parse('output/sch.xml')
- #print xmldoc.getElementsByTagName('Game').item(0).toxml()
- gameNodes = xmldoc.getElementsByTagName('Game')
- i = 0;
- attr = ('gameId', 'Week', 'GameDate', 'AwayTeam', 'HomeTeam', 'GameTime')
- #while gameNodes.item(i):
- for x in gameNodes:
- game = gameNodes.item(i)
- for x in attr:
- print game.getAttribute(x),
- print '\n'
- i+=1
Advertisement
Add Comment
Please, Sign In to add comment