Added cast to string in XML validation