private Optional<String> modelElement(String attributeName, Element element) {
        Optional<String> value = XML.attribute(attributeName, element);
        if (value.isPresent() && value.get().contains(" "))
            throw new IllegalArgumentException("The value of " + attributeName + " on " + element.getTagName() +
                                               "cannot contain space");
        return value;
    }
Parse leaf value in an xml tree.
config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomConfigPayloadBuilder.java