Search code examples
twitter-typeaheadbloodhound

Twitter typeahead.js / bloodhound.js with XML source


Is it possible to construct a typeahead.js / bloodhound.js (or similar) search that is XML (not JSON) based? I have a large XML document in memory already, and I'd hate to make another copy of it to accommodate JSON.


Solution

  • Yes, you can write a custom search handler that bypasses Bloodhound by setting a function in the source parameter as is shone here: http://www.ur-ban.com/2015/08/04/using-typeahead-js-without-bloodhound/