Article View: adobe.scripting.indesign
Article #2370Re: Changing Values in XML tags
From: Peter Kahrel
Date: Thu, 01 Jan 2009 21:00
Date: Thu, 01 Jan 2009 21:00
8 lines
1224 bytes
1224 bytes
Maybe something like this:
product = app.activeDocument.xmlElements[0].xmlElements.item ('Product');
product.xmlElements.item ('Table').xmlElements.item ('ART_PRICE').contents = '0.0';
But I don't really know much about XML. A better approach would be to search for any ART_PRICE tag, no matter where in the tree's hierarchy it is. All the suggestions here assume that ART_PRICE is at level three as a child of Product. I think that an approach along the lines that Stefan Rakete suggested, using XPath, is the way to go, but I don't know how that works.
Peter
Technical Details
Message-ID:
<59b7651b.6@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2!news2.arglkargh.de!zen.net.uk!dedekind.zen.co.uk!news4us.nl!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: "Peter Kahrel" <kahrel@kahrel.plus.com> Newsgroups: adobe.scripting.indesign Subject: Re: Changing Values in XML tags Message-ID: <59b7651b.6@webcrossing.la2eafNXanI> Date: Thu, 1 Jan 2009 13:00:30 -0800 References: <59b7651b.-1@webcrossing.la2eafNXanI> Lines: 13 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2!news2.arglkargh.de!zen.net.uk!dedekind.zen.co.uk!news4us.nl!webcrossing