A few
comments that probably have nothing to do with your problem:
-
ParseDocument() allocates two objects (memBufIS and domParser) that it never
releases. These objects are leaked. Not good.
-
X(CString, CString) would be unnecessary if you changed X(char*, char*) to
X(const char *, const char *). Since CString provides a conversion to const char
*, the compiler can automatically provide the cast. This should be safe, since
MemBufInputSource takes a const pointer. This approach is slightly more
efficient, but more important, it is more direct and therefore easier to
understand and maintain. Make the cast explicit if you're worried that it won't
be obvious what function gets called because there's no X() that takes
CStrings.
I
don't see a call to XMLPlatformUtils::Initialize() in your excerpt. If you don't
have one in your actual code, Xerces' behavior is undefined.
|
Title: Message
- MemBufInputSource with CString Jimmy Yu
- Re: MemBufInputSource with CString Jesse Pelton
- Re: MemBufInputSource with CString Jimmy Yu
- Re: MemBufInputSource with CString jiang lei
- RE: MemBufInputSource with CString Jesse Pelton
- Re: MemBufInputSource with CString Jimmy Yu
- RE: MemBufInputSource with CString Chaudhuri, Hiran
- RE: MemBufInputSource with CString Alberto Massari
- RE: MemBufInputSource with CString Chaudhuri, Hiran
- Re: MemBufInputSource with CString jiang lei
- RE: MemBufInputSource with CString Chaudhuri, Hiran