You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Moore, Christie" <ch...@attws.com> on 2002/10/17 18:05:52 UTC

I am not getting correct info from XalaNode*

I have created a XObject::eTypeNodeSet using the following code:

const XObjectPtr xObj(theEvaluator.evaluate(theDOMSupport,
	                         theContextNode,
                              XalanDOMString(expression.c_str()).c_str()));

I delared a vector (std::vector<XalanNode*> theResultSet) and I return it
once I loop through the returned nodeset to return each element node.

XalanNode* const node = nodeset.item(i);
theResultSet.pushback(node.cloneNode(true);

I thought I read somewhere that the nodeset returned is reference counted.

I have 3 layers of classes that this vector is returned too.  It returns all
of the correct info inside of each element node until I get to the initial
calling class.  The vector size is still correct the pointers are still
pointing to the same address but the information returning from getNodeName
is not correct.  Would this have something to do with reference counting and
if so how do I fix it.

P.S.  The DOM document, the Parser Liason and the DOM Support references are
all static and not created on the heap.
Thanks.  I hope this is not too confusing.  If more information is needed
please let me know.
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: I am not getting correct info from XalaNode*

Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.




Hi Christy,

Please post Xalan-C questions on the Xalan-C user list.  This list is not
the appropriate forum for these questions.

Dave



                                                                                                                                       
                      "Moore,                                                                                                          
                      Christie"                To:      "'xerces-c-dev@xml.apache.org'" <xe...@xml.apache.org>                  
                      <christie.moore@         cc:      (bcc: David N Bertoni/Cambridge/IBM)                                           
                      attws.com>               Subject: I am not getting correct info from XalaNode*                                   
                                                                                                                                       
                      10/17/2002 09:05                                                                                                 
                      AM                                                                                                               
                      Please respond                                                                                                   
                      to xerces-c-dev                                                                                                  
                                                                                                                                       



I have created a XObject::eTypeNodeSet using the following code:

const XObjectPtr xObj(theEvaluator.evaluate(theDOMSupport,
                                      theContextNode,
                              XalanDOMString(expression.c_str()).c_str()));

I delared a vector (std::vector<XalanNode*> theResultSet) and I return it
once I loop through the returned nodeset to return each element node.

XalanNode* const node = nodeset.item(i);
theResultSet.pushback(node.cloneNode(true);

I thought I read somewhere that the nodeset returned is reference counted.

I have 3 layers of classes that this vector is returned too.  It returns
all
of the correct info inside of each element node until I get to the initial
calling class.  The vector size is still correct the pointers are still
pointing to the same address but the information returning from getNodeName
is not correct.  Would this have something to do with reference counting
and
if so how do I fix it.

P.S.  The DOM document, the Parser Liason and the DOM Support references
are
all static and not created on the heap.
Thanks.  I hope this is not too confusing.  If more information is needed
please let me know.


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org