Re: Casting DOM_Node to DOM_Element... still a problem.

2001-04-03 Thread Ryan Koss
Thanks Andy, that was what I was missing... -ryan - Original Message - From: "Andy Heninger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 02, 2001 4:57 PM Subject: Re: Casting DOM_Node to DOM_Element... still a problem. > > DO

Re: Casting DOM_Node to DOM_Element... still a problem.

2001-04-02 Thread David_N_Bertoni
Ryan Koss wrote: > What compiler and OS is this running on because I still get a the following > compiler error when I try to do the cast that has been stated in this > multi-threaded email... I am running Mandrake linux 7.1 and my compiler is > GCC 2.95.3 > > xmlobject.cpp:446: conversion to no

Re: Casting DOM_Node to DOM_Element... still a problem.

2001-04-02 Thread Andy Heninger
ssage - From: "Ryan Koss" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 02, 2001 12:35 PM Subject: Re: Casting DOM_Node to DOM_Element... still a problem. > What compiler and OS is this running on because I still get a the following > compiler erro

Re: Casting DOM_Node to DOM_Element... still a problem.

2001-04-02 Thread Ryan Koss
ed. Thanks in advance -ryan - Original Message - From: "Miroslaw Dobrzanski-Neumann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 23, 2001 11:45 AM Subject: Re: Casting DOM_Node to DOM_Element > On Fri, Mar 23, 2001 at 09:20:22AM -0500, David E. Cl

RE: Casting DOM_Node to DOM_Element

2001-03-26 Thread Arnold, Curt
> The solution 1 (cast operator): > class DOM_Node > { > ... > operator DOM_Element(void); > }; > > The solution 2 (cast constructor): > class DOM_Element > { > ... > DOM_Element (const DOM_Node&); > }; > I think I would prefer the cast operator since that would most cle

RE: Casting DOM_Node to DOM_Element

2001-03-26 Thread peiyongz
ronto Laboratory email: [EMAIL PROTECTED] Phone: (416)448-4088; Fax: (416)448-4414; T/L: 778-4088 David N Bertoni/CAM/Lotus@Lotus on 03/23/2001 03:26:43 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: Casting DOM_Node to DOM_Element How about: return DOM_El

RE: Casting DOM_Node to DOM_Element

2001-03-23 Thread David_N_Bertoni
: Casting DOM_Node to DOM_Element 09:40 AM Please

RE: Casting DOM_Node to DOM_Element

2001-03-23 Thread peiyongz
Cleary" To: <[EMAIL PROTECTED]> Subject: RE: Casting DOM_Node to DOM_Element 03/23/2001 06:20 AM Please respond to xerces-c-dev

RE: Casting DOM_Node to DOM_Element

2001-03-23 Thread David_N_Bertoni
t;[EMAIL PROTECTED]> Subject: RE: Casting DOM_Node to DOM_Element

Re: Casting DOM_Node to DOM_Element

2001-03-23 Thread Miroslaw Dobrzanski-Neumann
On Fri, Mar 23, 2001 at 09:20:22AM -0500, David E. Cleary wrote: > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of John > > Snelson > > > > The C++ way of doing this is the following code fragment: > > > > if(node.getNodeType() == DOM_Node::ELE

RE: Casting DOM_Node to DOM_Element

2001-03-23 Thread David E. Cleary
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of John > Snelson > > The C++ way of doing this is the following code fragment: > > if(node.getNodeType() == DOM_Node::ELEMENT_NODE) { > DOM_Element element = static_cast(node); > } Wouldn't dynanic_cas

Re: Casting DOM_Node to DOM_Element

2001-03-23 Thread John Snelson
The C++ way of doing this is the following code fragment: if(node.getNodeType() == DOM_Node::ELEMENT_NODE) { DOM_Element element = static_cast(node); } John Snelson "Arnold, Curt" wrote: > > A very common pattern (at least in my code) when using Xerces-J's DOM is to do >something like: >

Re: Casting DOM_Node to DOM_Element

2001-03-22 Thread Andy Heninger
"Jason E. Stewart" <[EMAIL PROTECTED]> asks > Would dynamic_cast<> be appropriate here? > >DOM_Element childElem = dynamic_cast node; No. The "objects" are actually just smart pointers, and don't have any virtual functions or access to type information, at least from the C++ runtime's poin

Re: Casting DOM_Node to DOM_Element

2001-03-22 Thread Jason E. Stewart
"Sean Forde" <[EMAIL PROTECTED]> writes: > > > > > I haven't found a good way to do the equivalent of: > > > > DOM_Element childElem = (DOM_Element) node; > > > > with Xerces-C. I think you could do somehting like: > > > > DOM_Element childElem = *((DOM_Element*) &node); >

RE: Casting DOM_Node to DOM_Element

2001-03-22 Thread Sean Forde
> > I haven't found a good way to do the equivalent of: > > DOM_Element childElem = (DOM_Element) node; > > with Xerces-C. I think you could do somehting like: > > DOM_Element childElem = *((DOM_Element*) &node); > Try this: DOM_Element childElem = (DOM_Element&)