Skip to main content
npetch
Participant
May 4, 2015
Question

Using external XML document to update / change text fields inside of published captivate output.

  • May 4, 2015
  • 2 replies
  • 2901 views

Hello

I currently have a project where the client has requested to have the ability to update the text fields inside the project at a later date.

This is due to the nature of the content changing rather rapidly, i would like to set this up so the client can manage this them selfs.

What would the best way to do this be?

I'm thinking XML, an external XML sheet were by Captivate imports the text from this XML sheet and then displays it within the specific text fields contained within the captivate output.

This way the client would just update the external XML document(cut and paste the text in) and then the text would be dynamically updated in the published Captivate document.

any help would be amazing !

Thanks in advance

Nick

This topic has been closed for replies.

2 replies

Participating Frequently
November 11, 2015

I've tried the the following js/xml code with no luck.  Has anyone got it functioning.  I have it on hosted on a google drive. It is not getting the xml data to the array.

TLCMediaDesign
Inspiring
November 12, 2015

You are setting the value of newVarXml with "what" which is not a variable and if it is you would remove the quotes. what is also not defined in the code anywhere.

Also, when populating the array myArray in the loop, you are skipping the first index so you myArray[0] would not hold any value.

I've also found that Captivate does not like loops in the script window.

Participating Frequently
November 12, 2015

"what" is the string that populates the newVarXml and will display on the screen so that line is working. You are correct that [0] is empty so the array should populate starting at[1]. The script runs and will show "what" from this line: window.cpAPIInterface.setVariableValue("newVarXml","what"); but when I try to populate the newVarXml variable from this line:  window.cpAPIInterface.setVariableValue("newVarXml", window.myArray[1]);  which is on another page it will go blank which tells me the is no information in the variable. So the XML data is not populating any of the array locations.  It should populate myArray[1] - [4].

On the other hand if it doesn't like the script window I guess I could insert it into the published file directly and see how that goes. The code was taken from the video referenced at the top of the page.

TLCMediaDesign
Inspiring
May 4, 2015

Not a bad approach except that there would be limits as to the amount of text they could use. If the text overflows the boundary of the text caption, it would get cut off.

Using XML: Common JavaScript Interface in Adobe Captivate 8 - YouTube

Lilybiri
Legend
May 4, 2015

When having to translate text in Captivate, it is the only situation where I would check the option AutoSize Captions in the Preferences for that reason.

Captiv8r
Legend
May 4, 2015

Hi Lieve

But isn't this thread more about an end user having an ability to change text after the Captivate has been published and delivered? I could see where that might be useful if making changes then publishing to create a new output. But I'm interpreting that the situation here is that a Captivate project has been published and delivered, and some mechanism is desired that allows the recipient to modify an external XML file to influence changes in the already compiled Captivate output.

Cheers... Rick