How to add parent XML tag in ID CS5


hi,

 

i have following xml structrure in indesign cs5 document.

 

     <para>

          <link>

                <insert>

 

i want add <xref> tag within structure parent <insert>, below:

 

     <para>

          <link>

                <xref>

                    <insert>

 

 

can me on this.

 

thanks,

krishnan

hi,

 

first select <insert> tag,

 

var parenttagname = app.selection[0].associatedxmlelements[0].markuptag.name;

        if(parenttagname.tostring() == "insert"){

            app.selection[0].associatedxmlelements[0].xmlelements.add("xref", app.selection[0]);

            }

 

regards,

bala.



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support