|
+1 on this one. I´m starting to write my first add-on and needed to write functions like this one: private void addContextParam(Document webXml, String paramName, String paramValue) { Element root = webXml.getDocumentElement(); if (null != XmlUtils.findFirstElement("/web-app/context-param[param-name='" + paramName + "']", root)) { //context-param already exists, nothing to do return; } Element lastContextParam = XmlUtils.findRequiredElement("/web-app/context-param[last()]", root); Element contextParamElement = webXml.createElement("context-param"); root.insertBefore(contextParamElement, lastContextParam.getNextSibling()); |
||||||||||||||||||||||||||||||||||||||
Assigned to Stefan so we can capture requirements, assess time required and consider which future release is realistic.