🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
5 messages
5 total messages Started by Tomasz_Bujlow Thu, 19 Feb 2009 13:43
XML Tags - why I need to export and import XML source?
#998
Author: Tomasz_Bujlow
Date: Thu, 19 Feb 2009 13:43
17 lines
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?
Re: XML Tags - why I need to export and import XML source?
#1001
Author: Stefan_Rakete
Date: Thu, 19 Feb 2009 13:54
5 lines
863 bytes
Hi Tomasz,
yes this is a known issue that you are addressing, but you do not need to export and reimport the XML. You can just place the XML again on the page. Then you will see the picture.
Hope it will do in CS5!

Stefan
Re: XML Tags - why I need to export and import XML source?
#1044
Author: Tomasz_Bujlow
Date: Sat, 21 Feb 2009 20:06
1 lines
677 bytes
So how to place the XML again without exporting it and importing again?
Re: XML Tags - why I need to export and import XML source?
#1069
Author: Stefan_Rakete
Date: Mon, 23 Feb 2009 14:25
6 lines
749 bytes
Hi Tomasz,
the method ist placeXML on the root XML Element:

myRootXmlElement.placeXML(myTextFrame)

Stefan
Re: XML Tags - why I need to export and import XML source?
#968
Author: Tomasz_Bujlow
Date: Tue, 24 Feb 2009 17:32
1 lines
855 bytes
OK, but I completely cannot understand this example. I have got everything replaced, etc. I need only to reinsert all XML. What is "myTextFrame" in this example - all the XML of everything? How to get it? And what is the root element?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads