I'm writing a jQuery UI autoComplete, it works but I would like to retrieve a specific data (i.e lat and long) from an XML file. How would I go about do this?
Let's say the user type in autoComplete, Estevan Point (the first one from the XML file) then the lat=49.383333 and long=-126.55 would be that.
Here's my XML file:
<?xml version="1.0"?>
<airports>
<code id="YEP" name="Estevan Point" country="Canada" lat="49.383333" long="-126.55"></code>
<code id="YEU" name="Eureka" country="Canada" lat="79.983333" long="-85.816667"></code>
<code id="YND" name="Executive Gatineau-Ottawa" country="Canada" lat="45.521389" long="-75.563611"></code>
</airports>
Here's my code: http://ift.tt/1qc7pdl
No comments:
Post a Comment