Implemented XML validation