Hi Hussein,
Thank your for help. I need another small help on the XML mind. I am not able 
to run the application in our Linux server. I have a feeling I am missing 
something or not using the right command. Below is my code:


       File folder = new File(inDir);
       File[] listOfFiles = folder.listFiles();

for (File file : listOfFiles) {
                         if (file.isFile()) {
                             System.out.println(file.getName());
                             ProcessBuilder builder = new 
ProcessBuilder("/home/ubuntu/XMLMind/w2x-pro-1_8_0/bin/w2x -o docbook5 
/home/ubuntu/XMLMind/w2x-pro-1_8_0/in/test.docx 
/home/ubuntu/XMLMind/w2x-pro-1_8_0/out/test.xml");
                                  builder.redirectErrorStream(true);
                                  System.out.println("Build initiated");
                             Process p = null;
                                  try {
                                         p = builder.start();
                                  } catch (IOException e) {
                                         System.out.println("Error occured 
while executing Linux Command");
                                         e.getMessage();
                                  }
                             BufferedReader r = new BufferedReader(new 
InputStreamReader(p.getInputStream()));
                             String line = "";
                             while (true) {
                                 try {
                                                line = r.readLine();
                                         } catch (IOException e) {
                                                e.printStackTrace();
                                         }
                                 if (line == null) { break; }
                             }
                         }
                     }


Please, let me know if I am using the right format to call the XML Mind in 
process builder.

Thanks,
Alam Mahmood, Jr Software Engineer | SCCE & HCCA
6500 Barrie Rd | Suite 250 | Minneapolis, MN 55435 | 952.683.8540

[cid:image001.png@01D5C9F8.6774D500]<https://www.hcca-info.org/conferences/national/2020-compliance-institute>Attend
 HCCA's Compliance Institute * Gaylord Opryland Nashville, TN * March 29-April 
1, 2020 * Learn 
More<https://www.hcca-info.org/conferences/national/2020-compliance-institute>

--
XMLmind Word To XML Support List
w2x-support@xmlmind.com
https://www.xmlmind.com/mailman/listinfo/w2x-support

Reply via email to