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;