0 Replies Latest reply on Aug 17, 2012 1:18 PM by menah

    How do I check if the associated PageItem is there/exists from a XMLElement ?

    menah Level 1

      Hi,

       

      I have the following structure:

       

      • Extension Builder 1.5;
      • InDesign 5.0;
      • Image (Rectangule Frame);
      • XML tag associated with the Image.

       

      The following scenario:

       

      • I do have an application that checks if this strucuture is available and intact, that is, the user has not deleted the tag (XMLElement) and/or the Rectangule Frame(PageItem);
      • I do not want loop through allPageItems (the page should have many of them - more than 1000) and get the XMLElement;
      • So, I loop over the XMLElements and get the associated PageItem through xmlElement.xmlContent property;
      • The document images properties (image, epss, etc) never are populated (document.epss.length = 0);
      • I can validate if the tag was deleted or untaged easy.

       

      The problem:

       

      • User deletes the Image/Rectangule Frame (PageItem) and keep the xml tag (untag the XMLElement);
      • The isValid property (xmlElement.isValid = true) is true;
      • The associated PageItem becomes a Text and is valid as well;

       

      The question:

       

      • How do I check if the associated PageItem is there/exists from a XMLElement ?

       

      Regards

       

      Marcos