naalco72
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2012
04:54 PM
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
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
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
each item have number of identifications like
<Category>
<item
type="English"
FUNCTION_TO_Call = "English()">
</item>
</Category>
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
abc=kid.Function_to_call
abc()
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
2 REPLIES 2
GPF
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2012
06:06 PM
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.
naalco72
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2012
07:08 PM
Re: How to call a function located In an XML file
Hi GPF thanks it was very helpful answer it worked perfectly
thanks again
thanks again