void (Element e) { if (StringUtil.isNotEmpty(myXPathCondition)) { e.addContent(new Element("xpath-condition").setText(myXPathCondition)); } if (myApplyToSubTags) { e.addContent(new Element("apply-to-subtags")); } }