private void addTextContent(Element parent, TextObject textObj) /*throws XMLStreamException*/ {
		
		if (	(textObj.getText() == null || textObj.getText().isEmpty())
			&& 	(textObj.getPlainText() == null || textObj.getPlainText().isEmpty()))
			return;
		
		Element textEquiv = doc.createElementNS(getNamespace(), DefaultXmlNames.ELEMENT_TextEquiv);
		parent.appendChild(textEquiv);
		
		//OCR Confidence
		Double confidence = textObj.getConfidence();
		if (confidence != null) {
			DoubleValue dv = new DoubleValue(confidence);
			addAttribute(textEquiv, DefaultXmlNames.ATTR_conf, dv.toString()); 
		}

		//Plain text
		if (textObj.getPlainText() != null && !textObj.getPlainText().isEmpty())
			addTextElement(textEquiv, DefaultXmlNames.ELEMENT_PlainText, textObj.getPlainText());
		//Unicode text
		addTextElement(textEquiv, DefaultXmlNames.ELEMENT_Unicode, textObj.getText());
	}