🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2357

Changing Values in XML tags

#2357
From: Stefan_Jonsson
Date: Wed, 31 Dec 2008 07:31
27 lines
1227 bytes
Hi, I'm completely new to Scripting, but I need a script that does the following:

Find an XML tag and Replaces its content.

My Structure in Indesign is looking like this:

Root
   Product
        PRD_TITLE
        PRD_TEXT
        ART_NO
        ART_PRICE

...with several product nodes.

I Want to replace the content of ART_PRICE from whatever is in the element to "0:0". So that every price i zeroed.

Please help!

By the way I started a script something like this

app.activeDocument.search('^9^9:^9^9',false,false,'0:0');
app.activeDocument.search('^9^9:-',false,false,'0:0');

But I'm thinking this is the wrong way to go when using XML elements..??

/Mossman
Technical Details
Message-ID: <59b7651b.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,d78f6b73256f6f00,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Stefan_Jonsson@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Changing Values in XML tags
Message-ID: <59b7651b.-1@webcrossing.la2eafNXanI>
Date: Tue, 30 Dec 2008 23:31:49 -0800
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit