unfortunately RTTI is not available on all the platforms where Xerces compiles, so the sample code cannot make use of dynamic_cast.
Clearly you can download the source distribution of Xerces, turn on RTTI and use dynamic_cast in your code.
Alberto
At 15.32 29/03/2005 +0400, Michael Kochetkov wrote:
Hello, I have Xerces pre-built Win32 library with VC6/VC7.1. You use C-style cast notation in your samples. For example, see File: xerces-c-src_2_6_0\samples\PSVIWriter\PSVIWriterHandlers.cpp Method: void PSVIWriterHandlers::processDOMElement Code inside: for (unsigned int i=0; i < elems->getLength(); i++) { DOMElement* elem = (DOMElement*)elems->item(i);
Would not it be more reliable to make use of dynamic_cast? If you believe that it is then would not it be logical if the pre-built distribution packages contain the RTTI information? MS VC compilers family have the RTTI option turned off by default and as far as we do not build Xerces ourselves I am to use the same potentially unsafe cast.
Thank you, -- Michael Kochetkov.
--------------------------------------------------------------------- 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]