Hi John,
If you can reduce the XML data to just an associative array (or find one online, something mapping number to definition) this becomes very simple.
// In say PHP:
$defs = [
1 => "The definition",
2 => "The next definition",
// ... Add another ~5000? of those, which isn't all that much for a script to handle.
];
// Or you could load that from a JSON file, say. Then just get the Strongs number from the GET or POST request and do the lookup.
$n = isset($_REQUEST['n']) ? $_REQUEST['n'] : '';
return isset($defs[$n]) ? $defs[$n] : '';
// And that's it. You can rewrite those ternary operators as simple if/thens if that's clearer.
// I'm assuming you can do the AJAX request yourself and just need a server-side script to make the calls to.
// However: This dataset is sufficiently small that you could put it straight into JavaScript and forget AJAX at all.
Nigel.