> 
> b) What should be the correct way of down casting a DOM_Node to a
> DOM_Element?  I have run into this problem on several occasions where I get
> a DOM_Node by using the DOM traversal functions and, after determining its
> type to be DOM_Node::ELEMENT_NODE, I would like to start using it as a
> DOM_Element node.  Casting works on the Sun and MS compilers here (e.g.,
> replacing line 15 with element = (DOM_Element &)tmp_node;  But the HP-UX
> compiler we're using gets pretty miserable about this cast and returns an
> error.  I've tried using the dynamic_cast technique, but to no avail on
> HP-UX.
> 
> Has anyone dealt with these issues and have any ideas?


To get DOMMemTest working under HPUX, I had to modify the code as shown below:

Originally,

    DOM_Element  cloned = (DOM_Element &) root.cloneNode(true);

To get it past HPUX 11.0 aCC compiler,

    DOM_Node  abc = root.cloneNode(true);
    DOM_Element  cloned = (DOM_Element &) abc;

If I remember correctly, similar modifications were required for CC under HPUX.

rahul


Reply via email to