extracting into xml with referenced fields