String name = el.getLocalName();
// TODO: why??? There should always be a local name.
if (name == null) {
name = el.getNodeName();
}
ElementWrapper wrapper = new ElementWrapper(el);
Object previous = myMap.get(name);
if (previous == null) {
myMap.put(name, wrapper);
} else if (previous instanceof ElementWrapper) {
List<ElementWrapper> bucket = Lists.newArrayListWithCapacity(children);