Hi

Okay [2] is exactly what we had, but I've just realised we didn't have this in 
a <fx:Declarations> section, which is presumably why the compiler had ignored 
it! So add this, and suddenly I get the XML object being initialised with the 
XML file being embedded into the main .js file.

Interesting difference between options 1 and 2 is that the foreign-language 
characters in the XML are only rendered properly with the second option i.e. 
embedding an fx:XML object within the fx:Declarations. I'm guessing this to do 
with the "text/plain" MIME type, but am not sure what it should be for utf-8...?

Anyway, thanks, I'm happy with this working as intended, with just the 
embarrassment of having not spotted the lack of the <fx:Declarations> section!

cheers

   Andrew


-----Original Message-----
From: Yishay Weiss <[email protected]> 
Sent: 09 July 2019 15:17
To: [email protected]
Subject: [EXTERNAL] RE: Support for XML embedded via 'source' attribute

Maybe this [2] is closer to what you want.



I've tested [1] but not [2]. According to [2] your syntax was ok, so maybe post 
a test case demonstrating your problem.



[2] 
https://clicktime.symantec.com/3L3qfBwHuGUUvLznrv57UZx7Vc?u=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fblob%2Fdevelop%2Fexamples%2Fmxroyale%2Ftourdeflexmodules%2Fsrc%2Fspark%2Fcontrols%2FTextLayout3Example.mxml



________________________________
From: Yishay Weiss <[email protected]>
Sent: Tuesday, July 9, 2019 5:10:27 PM
To: [email protected]
Subject: RE: Support for XML embedded via 'source' attribute

Hi Andrew,



There's an example [1] here.



[1] 
https://clicktime.symantec.com/3KaAnp9RJNu19m4mXKhSNbm7Vc?u=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fblob%2Fdevelop%2Fexamples%2Fmxroyale%2Ftourdeflexmodules%2Fsrc%2Fexplorer.mxml



________________________________
From: Frost, Andrew <[email protected]>
Sent: Tuesday, July 9, 2019 4:52:36 PM
To: [email protected]
Subject: Support for XML embedded via 'source' attribute

Hi all

Am I missing something, or do we not yet have support for something like:
  <fx:XML id="myXML" source="xml_source_file.xml"/>

This is creating an XML object with ID 'myXML' but then not picking up and 
initialising it with the contents of that source file..

If this isn't implemented yet, then what would people think is the best way to 
do it: should we try to dynamically fetch the XML file at runtime? or should we 
build the XML into the JavaScript initialisation somehow?

thanks

   Andrew


Reply via email to