6 Replies Latest reply on Jul 16, 2008 10:47 AM by (Cyril_Desmoinaux)

    [CS2-JS] Error when inserting some text in table cell via XMLElement

      I have a very very strange InDesign behaviour when using XMLElement in a table Cell to insert a string.

      For example (in a table that has an XML structure) :

      var cell = table.cells[0];
      var cell_xe = cell.associatedXMLElement;
      var newtag_xe = cell_xe.xmlElements.add("mytag", null);

      // Up to now, no problem
      // Then I use only one of these following instructions at a time :

      newtag_xe.contents = "existe en 4,57 x 1,07 m"; // Gives an InDesign error "Object is invalid"
      newtag_xe.contents = "existe en 4,57 x 1,07 "; // Works fine

      I have a lot of other examples of that kind (not only failing on the last character). InDesign accepts (randomly, it seems) some strings and rejects some others, and no logical rule seems to emerge.

      Anyone with the same problem ?