Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to call a function located In an XML file

Hi i have XML file that do have number of items
each item have number of identifications like

FUNCTION_TO_Call = "English()">

as you can see that there is a text called English() defined in attribute Function_to_call

i was able tom get the text from XML file into my code using parsing method

but i don't fined any solution to instruct the program executor to call the function English() and run it

i use the following code


it says that there is no reference available in abc()
but if i use

print kid.Function_to_call

i get what was saved in that attribute in XML file i get English() which is what i want to call for execution

is there any other method to do that
0 Kudos

Re: How to call a function located In an XML file

you might be able to do something like eval(kid.Function_to_call) to call the function.
0 Kudos

Re: How to call a function located In an XML file

Hi GPF thanks it was very helpful answer it worked perfectly
thanks again
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.