fprintf(stderr, "%s at line %d\n",
PRINTF("%s at line %d\n",
HRESULT ParseExpat(const char *pBuffer, unsigned long cbBufSize, IXMLDocument *pDocument, IXMLElement **ppElement){	if (pDocument == NULL)	{		return E_INVALIDARG;	}	XML_Parser parser = XML_ParserCreate(NULL);	HRESULT hr = S_OK;	cParserState.spXMLDocument = pDocument;	pDocument->get_root(&cParserState.spXMLParent);	// Initialise the XML parser	XML_SetUserData(parser, &cParserState);	// Initialise the data handlers	XML_SetElementHandler(parser, OnStartElement, OnEndElement);	XML_SetCharacterDataHandler(parser, OnCharacterData);	XML_SetDefaultHandler(parser, OnDefault);	// Parse the data	if (!XML_Parse(parser, pBuffer, cbBufSize, 1))	{		/* TODO Create error code		   fprintf(stderr,			"%s at line %d\n",		   XML_ErrorString(XML_GetErrorCode(parser)),		   XML_GetCurrentLineNumber(parser));		 */		hr = E_FAIL;	}	// Cleanup	XML_ParserFree(parser);	cParserState.spXMLRoot->QueryInterface(IID_IXMLElement, (void **) ppElement);	cParserState.spXMLDocument.Release();	cParserState.spXMLParent.Release();	return S_OK;}