String returnText = "";
if (parser != null) {
try {
returnText = parser.getElementText();
} catch (XMLStreamException e) {
throw new OMStreamingException(e);
}
} else {
if (currentNode.getType() == OMNode.ELEMENT_NODE) {
returnText = ((OMElement)currentNode).getText();
}else if (currentNode.getType() == OMNode.TEXT_NODE){