0 Replies Latest reply on Jun 21, 2011 8:49 AM by GuntherChristiaens

    Error when loading xml in Indesign CS4




      A couple of years ago, we wrote a little javascript file to import an xml file in Indesign CS2. Which worked fine.


      But now in CS4, we get the following error message:


      Javascript Error!


      Error Number: 55

      Error String: Object does not support the property or method '[object InsertionPoint]'


      I narrowed it down to this little method:


      function verwijderlege(elm) => elm = app.activedocument which is an XML file.
      var i, offset;
        for (i = elm.xmlElements.length - 1 ; i > -1 ; i--)
        if (elm.xmlElements[i].contents == "")
        offset = elm.xmlElements[i].storyOffset;
        parentst = elm.xmlElements[i].parentStory;
      parentst.characters[offset].remove(); (Error message sais it's this line)


      I hope someone can help me with this.


      Thanks in advance,

      Gunther Christiaens