String (@NotNull Element element) { for (Element option : element.getChildren("option")) { if (option.getAttributeValue("name").equals("myName")) { return option.getAttributeValue("value"); } } throw new IllegalStateException(); }