Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 152999

Re: How to remove the XML attribute value in Indesign file by javascript

$
0
0

Try this,

 

var myDoc = app.activeDocument;
var root = myDoc.xmlElements[0];
var pStyle = root.evaluateXPathExpression("//*");
for(i=0;i<pStyle.length; i++)
{    for(j=0; j<pStyle[i].xmlAttributes.length; j++)    {        if(pStyle[i].xmlAttributes[j].name == "aid:pstyle")        {            pStyle[i].xmlAttributes[j].remove();        }    }
}

 

 

Vandy


Viewing all articles
Browse latest Browse all 152999

Trending Articles