code: private int nextFromTreeCommentOrCData()
          throws XMLStreamException
      {
          char c = getNextCharFromCurrent(SUFFIX_IN_DOC);
          if (c == '[') {
              checkCData();
              /* Good enough; it is a CDATA section... but let's just also
               * parse the easy ("free") stuff:
               */
              c = (mInputPtr < mInputEnd) ? mInputBuffer[mInputPtr++]
                  : getNextCharFromCurrent(SUFFIX_IN_CDATA);
              readCDataPrimary(c); // sets token state appropriately...
              return CDATA;
          }
          if (c == '-' && getNextCharFromCurrent(SUFFIX_IN_DOC) == '-') {
              mTokenState = TOKEN_STARTED;
              return COMMENT;
          }
          throwParseError("Unrecognized XML directive; expected CDATA or comment ('<![CDATA[' or '<!--').");
          return 0; // never gets here, but compilers don't know it...
      }
docs: <p>
  Note: According to StAX 1.0, coalesced text events are always to be
  returned as CHARACTERS, never as CDATA. And since at this point we
  don't really know if there's anything to coalesce (but there may
  be), let's convert CDATA if necessary.