Moved name check to XMLElement