improved parsing of xml and simplified building bundle for detail view