4 Replies Latest reply on Sep 8, 2011 8:55 AM by mlavie

    How to Place an Image into an XMLElement

    mlavie Level 1

      Hi All,


      I'm using InDesign CS5 and ActionScript.


      I have some text in a TextFrame marked with various Tags (XMLElements). I also want an in-line image between several of the words, with that image having its own Tag.


      I first entered some text in several tags, and then emptied the text from one of the Tags so that I could place a picture there which would move in-line with the text.


      The problem is, I can not figure out how to place an image file into an XMLElement. There is no way to add a new image  - the XMLElement's "images" property doesn't have an add() method, and there is no XMLElement.place() method.


      How can I place a picture in an extant XMLElement via scripting?