extract XML validation into a GRM method