textToken->Bind(nsLocalString(ptr, len));
textToken->Bind(nsDependentString(ptr, len));
void Tokenizer_HandleCharacterData(void *userData, const XML_Char *s, int len) {   XMLParserState* state = (XMLParserState*) userData;  if (state->incdata) {        // While we're in a CDATASection, keep appending all strings    // from expat into it.    state->cdataText.Append((PRUnichar *) s,len);  } else {    CToken* newToken = 0;    switch(((PRUnichar*)s)[0]){      case kNewLine:      case nsCRT::CR:        newToken = state->tokenAllocator->CreateTokenOfType(eToken_newline,eHTMLTag_unknown);         break;      case kSpace:      case kTab:        newToken = state->tokenAllocator->CreateTokenOfType(eToken_whitespace,eHTMLTag_unknown, nsLocalString((PRUnichar*)s, len));         break;      default:        {          CTextToken* textToken = (CTextToken*)state->tokenAllocator->CreateTokenOfType(eToken_text, eHTMLTag_unknown);          PRUnichar* ptr = (PRUnichar*)s;          if ((ptr >= state->bufferStart) && (ptr < state->bufferEnd)) {            nsReadingIterator<PRUnichar> start, end;            start = state->currentIterator;            start.advance(ptr - state->bufferStart);            end = start;            end.advance(len);            textToken->Bind(state->scanner, start, end);          }          else {            textToken->Bind(nsLocalString(ptr, len));          }          newToken = textToken;        }    }        if(newToken) {      nsExpatTokenizer::AddToken(newToken, NS_OK, state->tokenDeque, state->tokenAllocator);    }    else {      //THROW A HUGE ERROR IF WE CANT CREATE A TOKEN!    }  }  }