Class assignment with XML