For 1 source this is the correct code after the ajax call: url: \"links2.xml\",
I would like the source to be multiple xml files. How do I include the extra paths
I would separate the task into
If you're able to load data from multiple sources and uniform them, you can use the result to populate the autocomplete-control. I suggest you look into loading data async using jQuery Deferred-objects (api.jquery.com/jQuery.Deferred) and wait for all calls to return and use the result using $.when(...).then(...)
Example below originates from the well-written and quite well explained site: http://www.danieldemmel.me/blog/2013/03/22/an-introduction-to-jquery-deferred-slash-promise/
function getReady() { var deferredReady = $.Deferred(); $(document).ready(function() { deferredReady.resolve(); }); return deferredReady.promise(); } var firstRequest = $.ajax({ url: 'http://www.html5rocks.com/en/tutorials/file/xhr2/' }); var secondRequest = $.ajax({ url: 'http://www.html5rocks.com/en/tutorials/audio/scheduling/' }); $.when( getReady(), firstRequest, secondRequest ).done( function( readyResponse, firstResponse, secondResponse ) { var insertDiv1 = $(''); insertDiv1.html($(firstResponse[0]).find('section').html()); var insertDiv2 = $(''); insertDiv2.html($(secondResponse[0]).find('section').html()); $('body').append(insertDiv1, '
', insertDiv2); });