Parsing states from an XML file