now raising an error for invalid xml defitions.

closes #10