Reputation: 11
I come from an Android development background and I would like to know if there's a way to allow XML to execute a C/C++ method? This is similar to Android's onClick event where a method is executed when a event has been received i.e. a button press, but I just want the XML to map and execute the method.
Thanks
Upvotes: 0
Views: 163
Reputation: 29017
In general, no. For example, there is no way to make an XSLT document execute a C++ method.
There are some systems (.Net and XAML spring to mind, but I believe Android is similar), where a dialect of XML is used to define a GUI, and attributes or elements define the functions to be called. This works better in a language with reflection, where the engine reading the XML can directly call the functions, but with something like GetProcAddress or dlsym you could make it work.
Upvotes: 1