* @param xmlObject the object to validate
* @throws ValidationException thrown if the object is invalid
*/
protected void validateChildrenPresence(CipherData xmlObject) throws ValidationException {
if (xmlObject.getCipherValue() == null && xmlObject.getCipherReference() == null) {
throw new ValidationException("CipherData did not contain either a CipherValue or CipherReference child");
}
if (xmlObject.getCipherValue() != null && xmlObject.getCipherReference() != null) {
throw new ValidationException("CipherData contained both a CipherValue and a CipherReference child");
}
}