Legends.xml parsing