Hi

 

I’am trying to correct my code to follow the new C++ binding architechture.

 

I have a DOMElement node that represents a pointer to where I am in the DOM tree (nessesary since this is part of an interface for a script-language).

This is how I did it in the old version :

 

DOMElement m_LoadActiveNode;//(defined as a class member variable)

 

DOMNode tmpNode;

  tmpNode = m_LoadActiveNode.getPreviousSibling();

  if(tmpNode!=NULL)

  {

     m_LoadActiveNode = (DOMElement &)tmpNode;

  }

 

 

In the new 2.0.1, the m_LoadActiveNode is a pointer and not an instantiated object, thus the downcast does not work. How do I solve this problem???

 

 

I need something to hold a pointer to a node in the tree, since the DOM interface is to be accessible from a scriptlanguage.

 

e.g.

 

scriptXMLsetFirstChild();

str = scriptXMLgetNodeName();

 

Any ideas of how to do the downcast or any other way to maintain a DOMtree pointer as a class member variable would be very welcome.

 

 

Regards

 

 

Troels Rossing

 

www.Qualiware.com

 

Reply via email to