1 Reply Latest reply on Dec 2, 2013 3:01 AM by Green4ever

    find out a graphic in an xmlElement story

    Americo Pinto

      Hi everybody

       

      i do a javascript in which i want identify one or more graphics within an xmlElement collection

       

      ---------======= xml structure =======---------

      <doc>

           <tag1>

           </tag1>

           <graphic1>

           </graphic1>

           <graphic2>

           </graphic2>

      </doc>

       

      <doc>

           <tag1>

           </tag1>

           <graphic>

           </graphic>

      </doc>.

      ---------======= xml structure =======---------

       

       

      for (var h = 0; h < myTagElement.length; h ++)

      {

          for (var i = 0; i < myTagElement[h].xmlElements.length; i ++)

          {

              if (myTagElement[h].xmlElements[i].xmlContent)

              {

                  app.select(myTagElement[h].xmlElements[i]);

                  var strXml = myTagElement[h].xmlElements[i].graphics;

                  if (myTagElement[h].xmlElements[i].graphics != null)

                  {

                      var strPath = myTagElement[h].xmlElements[i].graphics[0].itemLink.filePath;

                      alert ('XML : ' + strXml + ' : ' + strPath);

                      }

                  else

                  {

                      var strname = myTagElement[h].xmlElements[i].graphics[0].itemLink.name;

                      alert ('Chemin : ' + strPath + ' Nom de fichier : ' + strname);

                      }

                  }

              }

          }

       

      Somebody could help me please ?

       

      Americo