> Hi All,
> I am using XPathEvaluator's selectSingleNode() which, returns a
pointer
> to XalanNode. When I call delete for this XalanNode it prints following
> message
>
> **********************************
> free(): invalid pointer 0x80607e8!
> pure virtual method called
> Aborted
> **********************************
>
> Same is the case with XalanNode* returned by NodeRefList's item().
>
> API documentation does not provides any pointer regarding this.
Since the XPathEvaluator returns pointers to the nodes in the source tree
you provide, you need to show us how you created the tree. If you used an
instance of an XMLParserLiaison, such as XalanSourceTreeParserLiaison,
then the documentation for the parseXMLStream() member function is
explicit:
/**
* Parse the text pointed at by the reader as XML, and return a
DOM
* Document interface. It is recommended that you pass in some
sort of
* recognizable name, such as the filename or URI, with which the
reader
* can be recognized if the parse fails.
*
* The liaison owns the XalanDocument instance, and will delete it
when
* when asked (see DestroyDocument()), or when the liaison is
reset, or
* goes out of scope.
*
* @param reader stream that should hold valid XML
* @param identifier used for diagnostic purposes only, some sort
of
* identification for error reporting, default
an empty
* string
* @return DOM document created
*/
Dave