Coker, Jonathan M wrote:
Hello,
   Most of the examples I have seen have all of the Xalan code in a
single routine.  I would like to wrap this in a class and break some of
the functionality into different member functions.  For example, I would
like to create a function that would take node as an argument then use
it for the context node to evaluate a path.  In order to do this it
seems like some of the things that are created (XercescDOMSupport,
XercesParserLiason, etc.) are good candidates for data members on the
class.  Does this seem reasonable or am I going to have a lot of trouble
trying to do this?

It's a reasonable thing, and essential if you're concerned with object lifetimes. For example, any documents you create with a XercesParserLiaison instance are destroyed when that instance goes out of scope.

As a side note, I would encourage you to use Xalan-C's default source tree implementation, rather than the Xerces-C DOM, unless your application has a specific need for the Xerces-C DOM.

Dave

Reply via email to