protected String getStringValueFromAttributeOrElement(String attributeName, String elementName, Element element) {
String value = null;
String attributeValue = element.attribute(attributeName);
Element childElement = element.elementNS(BpmnParser.ACTIVITI_BPMN_EXTENSIONS_NS, elementName);
String stringElementText = null;
if (attributeValue != null && childElement != null) {
addError("Can't use attribute '" + attributeName + "' and element '" + elementName + "' together, only use one", element);
} else if (childElement != null) {
stringElementText = childElement.getText();
if (stringElementText == null || stringElementText.length() == 0) {
addError("No valid value found in attribute '" + attributeName + "' nor element '" + elementName + "'", element);
} else {
// Use text of element
value = stringElementText;