Article View: adobe.scripting.indesign
Article #2367Re: Changing Values in XML tags
From: Stefan_Jonsson
Date: Thu, 01 Jan 2009 08:47
Date: Thu, 01 Jan 2009 08:47
18 lines
968 bytes
968 bytes
Ahh! think I Solved it!!
var products = app.activeDocument.xmlElements[0].xmlElements;
//loop through every product
for (var i = 0; i < products.length; i++) {
if (products[i].xmlElements.item('ART_PRICE') !=null) {
products[i].xmlElements.item('ART_PRICE').contents = "0:0";
}
else {}
}
Thanks both of you!
By the way, does it look right? It seem to work ok!
Technical Details
Message-ID:
<59b7651b.3@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.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: Stefan_Jonsson@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Changing Values in XML tags Message-ID: <59b7651b.3@webcrossing.la2eafNXanI> Date: Thu, 1 Jan 2009 00:47:05 -0800 References: <59b7651b.-1@webcrossing.la2eafNXanI> Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit