Saturday, June 14, 2003 11:13 AM
i am afraid you wont be able to do it. The Java Document object is implementation dependent (each XML parser has it's own private class that implements the Document interface). All these implementations end up being trees of Java objects. What you are trying to do is to change the nature of the implementation. The only thing you will be able to do is manipulate from your C++ code the Document as Java objects the same way you would do in Javal. The performance gain will probably be marginal considering how much 'Java' C++ code you will write.
Visa versa, the C++ dll expects an object that is the tree of C++ objects. This object would not be compatible, most likely, with the way Java manipulates Object derived classes.
the solution might be to create your own wrapper class (C++/JNI) that would parse the Document object using the DOM api and turn it into some other object, compatible with your C++ dll.