[Xerte] Xerte3: Loading external data

Peter Huppertz peter.huppertz at baselgovernance.org
Tue Jun 15 14:35:44 BST 2010


I'm using the templateDataSource of the Application icon. This works like a charm. I use it to load a XML file which holds all the text of my piece, so I'm ready to translate it to different languages by just adding a new language to my xml. Would you do it that way?

Peter



On 15.06.2010, at 14:29, Julian Tenney wrote:

> I think you need to call iconID.load()?
> 
> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Peter
> Huppertz
> Sent: 15 June 2010 13:15
> To: Xerte discussion list
> Subject: [Xerte] Xerte3: Loading external data
> 
> There are a number of Data icons in Xerte3. As far as I can see
> HTTPService is the only icon which is working at the moment. Can I use
> this icon to load a XML file which is located in the same directory as
> my Xerte piece?
> 
> I tried the following:
> HTTPService, url = languages.xml
> -- EventHandler "result", debug(event.target.data)
> but nothing comes up.
> 
> Alternatively I tried to load it using a script icon:
> 
> import flash.net.URLLoader;
> import flash.net.URLRequest;
> var loader:URLLoader = new URLLoader();
> loader.addEventListener(Event.COMPLETE, loadXML);
> loader.load(new URLRequest("languages.xml"));
> function loadXML(e:Event):void {
>  xml = new XML(e.target.data);
>  debug(xml);
> }
> 
> This gives me: Parse Error: msg.no.paren.arg [line:5/k04]
> 
> Any ideas?
> 
> Peter
> 
> 
> ==================================
> Peter Huppertz
> E-learning and IT Specialist
> International Centre for Asset Recovery
> Basel Institute on Governance
> Phone: +41 61 205 55 18
> Fax: +41 61 267 55 19
> 
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte

==================================
Peter Huppertz
E-learning and IT Specialist
International Centre for Asset Recovery
Basel Institute on Governance
Phone: +41 61 205 55 18
Fax: +41 61 267 55 19



More information about the Xerte mailing list