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
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
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
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
> 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
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
: Casting DOM_Node to
DOM_Element
09:40 AM
Please
Cleary" To:
<[EMAIL PROTECTED]>
Subject: RE: Casting DOM_Node
to DOM_Element
03/23/2001
06:20 AM
Please
respond to
xerces-c-dev
t;[EMAIL PROTECTED]>
Subject: RE: Casting DOM_Node to
DOM_Element
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
> -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
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:
>
"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
"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);
>
>
> 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&)
15 matches
Mail list logo