Mike Thompson wrote:
> I am using XXE Professional Edition 3.3.0.
> I have a java application that invokes  
> com.xmlmind.xmledittool.convert.StartConvertDoc.main
> The resulting conversion is fine, except the java exists the program 
> prior returning from StartConvertDoc.main.
> And if I run this from XXE, the editor dies as well.
> 
> Is StartconvertDoc supported as a java API?

No, not at all. Its code contains a "System.exit(0);" which explains the 
behavior you describe.



> Any help would be appreciated.

You don't need to execute convertdoc from within XXE (convertdoc is in 
fact a GUI-less XXE). It's simpler, faster and safer to invoke the 
process command of your choice.

Command cmd = Commands.getCommand("COMMAND_NAME_HERE");
if (cmd != null &&
     cmd.prepareCommand(docView, parameter, -1, -1))
     cmd.executeCommand(docView, parameter, -1, -1);

docView is a view of a document. It may be obtained using various means 
depending on the context from which you want to invoke the process command.

parameter contains the arguments passed to the process command. Example: 
'"doc.xml" "file:///tmp/out%20dir"'.

http://www.xmlmind.com/xmleditor/_distrib/doc/commands/concepts.html
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/process.html
http://www.xmlmind.com/xmleditor/_distrib/doc/dev/command.html
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmledit/edit/Commands.html
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmledit/gadget/Command.html
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmledit/view/DocumentView.html




Reply via email to