I have a NSPopupButton in my view that I would like to fill with various country names. I have an XML file that has all the various countries I need to support which is in a format like so
<?xml version="1.0" encoding="utf-8" ?>
<CountryCodes>
<option value="Afghanistan" data-alternative-spellings="AF">Afghanistan</option>
<option value="Åland Islands" data-alternative-spellings="AX Aaland Aland" data-relevancy-booster="0.5">Åland Islands</option>
<option value="Albania" data-alternative-spellings="AL">Albania</option>
<option value="Algeria" data-alternative-spellings="DZ">Algeria</option>
</CountryCodes>
I would like to have the popup button bind to this xml file. Is that actually possible, or would I have to first convert the XML into a dictionary or an array and then load it in? If that's the case what would be the best approach for this assuming I have a really large number of option elements with in the xml?
Thanks!