Article View: adobe.scripting.indesign
Article #998XML Tags - why I need to export and import XML source?
From: Tomasz_Bujlow
Date: Thu, 19 Feb 2009 13:43
Date: Thu, 19 Feb 2009 13:43
17 lines
1463 bytes
1463 bytes
Hi all, I have got problem with updating XML Tags. When some textframe is tagged and I would like to change content of this, I can simply do: rootElement.xmlElements[0].contents = "new text"; and this is working as expected - immediatley after this text content is changed. But when I try to change image in image box associated with tag by: rootElement.xmlElements[1].xmlAttributes[0].value= "path_to_image"; this is not working sirectly. Simply, "href" value is updated, but some internal links still direct to old image link. I have to do this: var tmpFile = File(tmpPath + "docum.xml"); myDocument.exportFile(ExportFormat.xml, tmpFile); myDocument.importXML(tmpFile); After exporting and importing XML content, links are updated and ecerything works fine. Can I simply update these links and do everything without exporting and importing back this xml content?
Technical Details
Message-ID:
<59b7fbc7.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,2e9e3c5bea46d7a1,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Tomasz_Bujlow@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: XML Tags - why I need to export and import XML source? Message-ID: <59b7fbc7.-1@webcrossing.la2eafNXanI> Date: Thu, 19 Feb 2009 05:43:22 -0800 Lines: 23 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit