if (Element.forName(reader.getLocalName()) != Element.SERVER) {
throw unexpectedElement(reader);
}
Namespace readerNS = Namespace.forUri(reader.getNamespaceURI());
switch (readerNS) {
case DOMAIN_1_0:
readServerElement_1_0(reader, address, operationList);
break;
default:
// Instead of having to list the remaining versions we just check it is actually a valid version.
for (Namespace current : Namespace.domainValues()) {
if (readerNS.equals(current)) {
readServerElement_1_1(readerNS, reader, address, operationList);
return;
}
}
throw unexpectedElement(reader);