Skip to main content
Participant
January 24, 2014
Question

Help needed - remove xmlimportmap

  • January 24, 2014
  • 1 reply
  • 409 views

Hello all,

First time in the forum...

I have written a v. simple script as follows:

main()

function main(){

          var myDocument = app.documents.item(0);

          //Create a tag to style mapping.

          myDocument.xmlImportMaps.add(myDocument.xmlTags.item("unit"), myDocument.paragraphStyles.item("table_header_unit"));

          //Map the XML tags to the defined styles.

          myDocument.mapXMLTagsToStyles();

}

Now I'd like a script to remove the mapping preferences.

can anyone help or point me to relevant literature/documentation.

Thanks.

//Ot_Gu

This topic has been closed for replies.

1 reply

Jump_Over
Legend
January 24, 2014

Hi,

Usually, if you are able to add() something ==> you are able to remove() it.

Assuming your xmlImportMap is the last added to doc ==> try ==>

myDocument.xmlImportMaps[-1].remove();

refer to  http://jongware.mit.edu/idcs5/pc_XMLImportMap.html

Jarek