Collection errors = new ArrayList();
xmlOptions.setErrorListener(errors);
if (!loginConfig.validate(xmlOptions)) {
throw new DeploymentException("Invalid login configuration:\n" + errors + "\nDescriptor: " + loginConfig.toString());
}
XmlCursor xmlCursor = loginConfig.newCursor();
ObjectName nextName = null;
try {
boolean atStart = true;
while ((atStart && xmlCursor.toFirstChild()) || (!atStart && xmlCursor.toNextSibling())) {
atStart = false;