At 15.56 29/03/2005 +0400, Michael Kochetkov wrote:
> Hi Michael,
Hi, Alberto
> unfortunately RTTI is not available on all the platforms
> where Xerces compiles, so the sample code cannot make use of
> dynamic_cast.
Well, I only asked for /GR switch while building Xerces for VC6/7.X.

> Clearly you can download the source distribution of Xerces,
> turn on RTTI and use dynamic_cast in your code.
Our management prefer to have "official" builds.

We'll think about it; the downside would be that 1) RTTI makes the DLL bigger, and 2) having it enabled only on some platforms could lead to coding errors.



BTW, I have noticed that
for (XMLSize_t i = 0; i < len; ++i) {
        XS::DOMNode* curNode = myNodes->item(i);
        XS::DOMElement* curElement =
reinterpret_cast<XS::DOMElement*>(curNode);
        XS::DOMNodeList *anotherNodeList =
elem.getElementsByTagName(wsAgent.c_str());

works pretty well indeed even if curNode does not contain child nodes (XS
stands for the Xerces long namespace name). Does Xerces ever return pure
DOMNode* pointers?

I don't get the issue: what do you mean by "works pretty well indeed"? I cannot even guess what this code should do, as you are invoking getElementsByTagName on the "elem" variable but you just initialized "curElement".
As for the "pure DOMNode* pointers", I guess you are asking if a DOMNode object can ever exist; in this case, the answer is no, as it is a pure virtual interface.


Alberto



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



Reply via email to