Article View: adobe.scripting.indesign
Article #2362Re: Changing Values in XML tags
From: KvD
Date: Wed, 31 Dec 2008 11:37
Date: Wed, 31 Dec 2008 11:37
15 lines
980 bytes
980 bytes
I assume you are using JavaScript, but what version of InDesign are you using?
This bit will work in CS2 and CS3:
var products = app.activeDocument.xmlElements[0].xmlElements;
//loop through every product
for (var i = 0; i < products.length; i++) {
//there must be a ART_PRICE element in each product!
products[i].xmlElements.item("ART_PRICE").contents = "0:0";
}
Good Luck
Technical Details
Message-ID:
<59b7651b.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b7651b.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,d78f6b73256f6f00 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: KvD@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Changing Values in XML tags Message-ID: <59b7651b.0@webcrossing.la2eafNXanI> Date: Wed, 31 Dec 2008 03:37:20 -0800 References: <59b7651b.-1@webcrossing.la2eafNXanI> Lines: 16 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit