Added XSD check, fixed empty name tag problem