Element confidenceElement = createConfidenceElement(session, confidence.getCvConfidenceType(), confidence.getValue()); confidenceListElement.appendChild(confidenceElement); Element confidenceElement = createConfidenceElement(session, annotation.getCvTopic(), annotation.getAnnotationText());