You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Avishay Balderman <av...@whale-com.com> on 2001/01/25 10:57:42 UTC

Get the name of the parsed file

Hi 
I am using sax.
I would like to know the name of the parsed file .
The methods in DefaultHandler class can not help me.
( only: 
    void warning(const SAXParseException& exception);
    void error(const SAXParseException& exception);
    void fatalError(const SAXParseException& exception);

)
which  are called only when there is a problem.
Any ideas?

Thanks
		Avishay Balderman

Re: Get the name of the parsed file

Posted by Dean Roddey <dr...@charmedquark.com>.
Get the name of the parsed fileLook at the Locator interface in the SAX standard.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"We're gonna need a bigger boat"


  ----- Original Message ----- 
  From: Avishay Balderman 
  To: 'xerces-c-dev@xml.apache.org' 
  Sent: Thursday, January 25, 2001 1:57 AM
  Subject: Get the name of the parsed file


  Hi 
  I am using sax. 
  I would like to know the name of the parsed file . 
  The methods in DefaultHandler class can not help me. 
  ( only: 
      void warning(const SAXParseException& exception); 
      void error(const SAXParseException& exception); 
      void fatalError(const SAXParseException& exception); 

  ) 
  which  are called only when there is a problem. 
  Any ideas? 

  Thanks 
                  Avishay Balderman 


RE: Get the name of the parsed file

Posted by Michael Nigbor <mi...@riolabs.com>.
Get the name of the parsed fileYou need to do a little work as its not
directly accessible.

Create and register a Locator object with your subclass of DocumentHandler
using DocumentHandler::setDocumentLocator() and use its getSystemId() member
function.

Of course, your subclass will have to reimplement this function so it can
store the Locator (HandlerBase doesn't do this for you).
  -----Original Message-----
  From: Avishay Balderman [mailto:avishay@whale-com.com]
  Sent: Thursday, January 25, 2001 2:58 AM
  To: 'xerces-c-dev@xml.apache.org'
  Subject: Get the name of the parsed file


  Hi
  I am using sax.
  I would like to know the name of the parsed file .
  The methods in DefaultHandler class can not help me.
  ( only:
      void warning(const SAXParseException& exception);
      void error(const SAXParseException& exception);
      void fatalError(const SAXParseException& exception);

  )
  which  are called only when there is a problem.
  Any ideas?

  Thanks
                  Avishay Balderman