Curt is correct, in that I am assuming you know that the Node is an
DOM_Entity type node and was passed around your code as a DOM_Node and you
simply want to get its derived type back. If you do not know what type it
really is, you do have to check it. The VC++ macro "DYNAMIC_DOWNCAST" is
another way to check if that works for you.

> -----Original Message-----
> From: Adams, David [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, June 08, 2001 3:16 PM
> To:   '[EMAIL PROTECTED]'
> Subject:      RE: sample for down casting DOM_Node to DOM_Entity ??
> 
> DOM_Node n = // some node;
> DOM_Entity e = dynamic_cast<DOM_Entity>(n);
> 
> I do not know what compiler you are using, but you will need to set the
> /GR
> switch on VC++ compilers. This is done by going to Project->settings,
> select
> the C/C++ tab, select the C++ Language category, and click on "Enable
> Run-Time Type Information (RTTI)" to enable it.
> 
> > -----Original Message-----
> > From:       Awasthi, Anand [SMTP:[EMAIL PROTECTED]]
> > Sent:       Friday, June 08, 2001 2:58 PM
> > To: '[EMAIL PROTECTED]'
> > Subject:    sample for down casting DOM_Node to DOM_Entity ??
> > 
> > Hi,
> > 
> > could someone pls provide sample code for down casting DOM_Node to
> > DOM_Entity ??
> > 
> > thanks
> > Anand
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to