Hi Dave,
Your points 2) + 3) are interesting. Right now I'm loading XML files into
memory via xercesc. I cache my XML islands in memory (xercesc::DOMDocument).
If the user manipulates the data via my user interface, I simply serialize
and save to file, but retain an in-memory reference (without reload). I also
use this xercesc::DOMDocument as input to my precompiled XalanTransformer
(which I also cache). I guess you could look at this as a in-memory XML
database.
So my question is: can I skip the xercesc interface all together, and just
make use of xalanc? This may simpify my code somewhat, and hopefully give me
a performance boost. The only aspects of xercesc I use are the W3C DOM
interface , the serializer (for writing), and the XercesDOMParser (for
reading).
Next Item: the only reason I make use of the xalanc::XercesDOMSupport and
xalanc::XercesDOMSupport are because I need to use XalanDocument for XPath
expressions.
Example,
xalanDocument = parserLiaison.createDocument(domDoc, false, true);
followed by a selectNodeList call.
Question: Is it possible to use the XPath support without making use of the
ParserLiason and DomSupport classes?
Cheers,
Hans
----- Original Message -----
From: "David Bertoni" <[EMAIL PROTECTED]>
To: <xalan-c-users@xml.apache.org>
Sent: Thursday, December 04, 2008 18:43
Subject: Re: Xalan with VC++8
Dyuti Barma wrote:
Removed all the warnings.
However, another issue has cropped up :
I'm using the the following snippet of code to instantiate an object of
XercesDOMSupport :
*/// dom_support_ - holds the XALAN XercesDOMSupport
xalanc_1_11::XercesDOMSupport dom_support_;*
However, getting the following error :
*error C2512: 'xalanc_1_11::XercesDOMSupport' : no appropriate default
constructor available
T*his was working fine with xalanc_1_10 / VC7.1.
How do I fix this ?
Unfortunately, the signature of the constructor had to change to fix a
potential bug. You now need to supply the XercesParserLiaison instance to
the constructor:
xalanc::XercesParserLiaison liaison;
xalanc::XercesDOMSupport::support(liaison);
A few comments:
1. Unless you have some specific need to use two different versions of
Xalan-C at the same time, I think you will find it easier to use the
namespace alias "xalanc" instead of the version-qualified namespace.
2. Using the Xerces-C DOM will result in much higher memory usage and
lower performance than the default Xalan source tree implementation. Only
use the DOM if you really need its features.
3. We don't recommended using the lower-level classes like
XercesParserLiaison and XercesDOMSupport, etc., unless you have some
specific need. The XalanTransformer class does offer support for using
the Xerces-C DOM, if you really must use it.
Dave