Hi Gavin,
Definitely it would be faster to do this validation using program than doing the same manually.
If an attribute is mandatory then the element has to have that attribute or else it would fail in validation.Even empty attribute would do.
If attribute sex is mandatory for element name.then the following is valid.
<name sex="">rahul</name>
You can find some code example in XML faq for validation.