views:

194

answers:

2

Hi: Our application is written in VC++ and we are using MSXML for parsing. Now we want to pass MSXML document object from our application to a java application for processing. How can I achieve this? Does java (swing) support MSXML or MSXML objects? We are using DOM parser.

Any help appreciated,

Thanks, KK

+4  A: 

why not just pass the XML document itself (i.e. serialized to text)? You'll save yourself a big headache.

spender
A: 

No, Java does not support an MSXML object. Probably, what you should do is serialize the document to a string, and transmit that string in some way to the Java application.

One way to transmit it is to save it to a disk file in the VC++ app, and then read it from the disk file in the Java app. Another way is to send it over the network via an HTTP interface. In this case the Java app would have to have an HTTP listener waiting on a TCP port. Another option is to use MSMQ: put the string on a queue in VC++, pull the message from MSMQ from within Java. You could use a simple socket class. There are many more options.

But in all cases you will transmit a string representation of the XML, not the actual in-memory MSXML object.

Cheeso