I have inserted a label to the object eg.
obj.insertLabel("label1" , "value1");
Is there any method to remove the label instead of assigning empty string to "label1"?
There is an option with IDML.
If your object is a page item, you could export as a snippet, open the idms file in a text editor, remove the label in the snippet, place the snippet.
You just have to look for something like that:
<Label>
<KeyValuePair Key="String" Value="String"/>
</Label>
See also:
http://forums.adobe.com/message/2549168#2549168
Uwe
North America
Europe, Middle East and Africa
Asia Pacific