(const XML_Char*) encoding.GetUnicode());
(const XML_Char*) encoding.get());
int Tokenizer_HandleExternalEntityRef(XML_Parser parser,                                      const XML_Char *openEntityNames,                                      const XML_Char *base,                                      const XML_Char *systemId,                                      const XML_Char *publicId){  int result = PR_TRUE;#ifdef XML_DTD  // Load the external entity into a buffer  nsCOMPtr<nsIInputStream> in = nsnull;  nsAutoString urlSpec( (const PRUnichar*) systemId );  nsAutoString baseURL( (const PRUnichar*) base );  nsAutoString absURL;  nsresult rv = nsExpatTokenizer::OpenInputStream(urlSpec, baseURL, getter_AddRefs(in), &absURL);  if (NS_SUCCEEDED(rv) && nsnull != in) {    PRUint32 retLen = 0;    PRUnichar *uniBuf = nsnull;    rv = nsExpatTokenizer::LoadStream(in, uniBuf, retLen);    // Pass the buffer to expat for parsing    if (NS_SUCCEEDED(rv) && nsnull != uniBuf) {          // Create a parser for parsing the external entity      nsAutoString encoding; encoding.AssignWithConversion("UTF-16");        XML_Parser entParser = nsnull;      entParser = XML_ExternalEntityParserCreate(parser, 0,         (const XML_Char*) encoding.GetUnicode());      if (nsnull != entParser) {        XML_SetBase(entParser, (const XML_Char*) absURL.GetUnicode());        result = XML_Parse(entParser, (char *)uniBuf,  retLen * sizeof(PRUnichar), 1);        XML_ParserFree(entParser);      }      PR_FREEIF(uniBuf);    }  }#else /* ! XML_DTD */  NS_NOTYETIMPLEMENTED("Error: Tokenizer_HandleExternalEntityRef() not yet implemented.");#endif /* XML_DTD */  return result;}