NodeList list = validatorElement.getChildNodes();
for (int i = 0; i < list.getLength(); i++) {
if (list.item(i).getNodeType() == Node.ELEMENT_NODE) {
Element element = (Element)list.item(i);
String name = element.getLocalName();
WidgetValidatorBuilder builder;
try {
builder = (WidgetValidatorBuilder)this.widgetValidatorBuilderSelector.select(name);
} catch(ServiceException e) {
throw new CascadingException("Unknow kind of validator '" + name + "' at " +
DomHelper.getLocation(element), e);
}
widgetDefinition.addValidator(builder.build(element, widgetDefinition));
}
}
}
}