[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Extracting error infromation using MSXML.DLL parser

  • From: David Schach <davidsch@m...>
  • To: Patrik Muzila <patrik@a...>, xml-dev@i...
  • Date: Mon, 12 Jan 1998 09:26:58 -0800

msxml.dll error
The IID  is in the SDK.  It's defined in the same file as IID_IXMLDocument.

> -----Original Message-----
> From:	Patrik Muzila [SMTP:patrik@a...]
> Sent:	Friday, January 09, 1998 2:39 PM
> To:	xml-dev@i...
> Subject:	Extracting error infromation using MSXML.DLL parser
> 
> I am using the C++ based MSXML parser (MSXML.DLL) from Delphi using
> COM.   I got the parser working, however when an error occurs I am
> unable to extract the error infromation. In my Delphi code I am trying
> to mimic the C++ example from the Microsoft site :
> 
> ...
> 
> {        
> 	//        
> 	// Failed to parse stream, output error information.
>         //        
> 	IXMLError *pXMLError = NULL ;        
> 	XML_ERROR xmle;    
> 
>         hr = pDoc->QueryInterface(IID_IXMLError, (void **)&pXMLError);
>         CHECK_ERROR(SUCCEEDED(hr), "Couldn't get IXMLError");    
> 
>         ASSERT(pXMLError);            
> 
> 	hr = pXMLError->GetErrorInfo(&xmle);
>         SAFERELEASE(pXMLError);
>         CHECK_ERROR(SUCCEEDED(hr), "GetErrorInfo Failed");   
>  
>         printf("%s: Error on line %d. Found %S while expecting %S\r\n",
>                 argv[0],                
> 		xmle._nLine,
>                 xmle._pszFound,                
> 		xmle._pszExpected);
>     
>         SysFreeString(xmle._pszFound);       
> SysFreeString(xmle._pszExpected);
>         SysFreeString(xmle._pchBuf);    
> }
> 
> ...
> 
> I get stuck when trying to call the QueryInteface method as I cannot get
> the IID_IXMLError GUID. Is there anyone out there who has an idea how
> could it be done from Delphi? Also, could somebody from Microsoft
> comment on why is the extraction of the error informaton made this
> comlicated ?
> 
> Patrik Muzila
> Allaire Corp.
> 
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
> To (un)subscribe, mailto:majordomo@i... the following message;
> (un)subscribe xml-dev
> To subscribe to the digests, mailto:majordomo@i... the following
> message;
> subscribe xml-dev-digest
> List coordinator, Henry Rzepa (mailto:rzepa@i...)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.