1 Reply Latest reply on Mar 11, 2013 12:26 AM by selvam214

    Get images with xml

    Venkiselva

      Hi All,

       

      I need a JAVA script coding to get more images while doing xml import.

      I have followed the xml coding as per below, please anyone help for this

       

      <imageobject><Image href="CH11_010.jpg"/>

       

      Thanks,

      Selva

        • 1. Re: Get images with xml
          selvam214 Level 1

          I'm using the below script for import xml with image, xml working fine. But not working the import image and not display the import image path, can you please help for this and good to me for what I have made the mistake

           

          var myTemplate = File.openDialog("choose a template");

          var myFolder = Folder.selectDialog("choose a folder to process");

          var myDocs = myFolder.getFiles("*.xml");

          for (i = 0; i < myDocs.length; i++) {

          // open template :

          var newDoc = app.open(myTemplate);

          // import XML :

          var myXMLImportPreferences = newDoc.xmlImportPreferences;

          myXMLImportPreferences.allowTransform = false;

          myXMLImportPreferences.createLinkToXML = false;

          myXMLImportPreferences.ignoreUnmatchedIncoming = false;

          myXMLImportPreferences.importCALSTables = false;

          myXMLImportPreferences.importTextIntoTables = false;

          myXMLImportPreferences.importToSelected = false;

          myXMLImportPreferences.removeUnmatchedExisting = false;

          myXMLImportPreferences.ignoreWhitespace = false;

          myXMLImportPreferences.repeatTextElements = false;

          newDoc.importXML(myDocs[i]);

          // add additional document-specific processing steps here

          document.textPreferences.smartTextReflow = true;

          document.textPreferences.limitToMasterTextFrames = false;

          document.textPreferences.deleteEmptyPages = false;

          document.textPreferences.addPages = AddPageOptions.END_OF_STORY;

          for(var index = 0; index < 10; index++)

          }

           

           

          Output screen shot here:

          import_image.JPG