code: public String rawElementText(XMLStreamReader reader) throws XMLStreamException {
      String elementText = reader.getElementText();
      elementText = elementText == null || elementText.trim().length() == 0 ? null : elementText.trim();
      return elementText;
    }
docs: Reads and trims the element text and returns it or {@code null}
  
  @param reader  source for the element text
  @return the string representing the trimmed element text or {@code null} if there is none or it is an empty string
  @throws XMLStreamException