1 Reply Latest reply on Aug 19, 2015 11:17 PM by Dirk Becker

    Add new XMLElement in XMLElements


      I am generating InDesign from backend code through application, using InDesign Server. I am using C# with Visual Studio.

      I need to add new XMLElement in XMLElements in opened indesign document. I am struggling here to add this.

      I can see method .Add() in XMLElement but it asks for MarkupTag, I am not sure what to add here.


      Can anyone help me with API / COM component documents or help me out to add new element would be good.

        • 1. Re: Add new XMLElement in XMLElements
          Dirk Becker Level 4

          I'm not using the COM binding so details may differ:


          The add() accepts either a string or an instance of XMLTag in its first argument.

          Note that the document's xmlElements collection is special, it can hold only a single element wich is already created with the document. It is tagged "Root", you can only retag that element, or add child elements.