lundi 2 décembre 2019

How to use 'FILTERXML WEBSERVICE' formula extract phonetic alphabet from oxford dictionary in Excel?

I'd like to use FILTERXML WEBSERVICE formula to extract phonetic alphabet (NAmE) from oxford dictionary.

Oxford English-English Dictionary

Here's a similar example to show you how to search YouDao English-Chinese dictionary:

fill commander-in-chief in cell A1; and fill below formula in B1;

=IF(A1="","",FILTERXML(WEBSERVICE("http://dict.youdao.com/search?q="&A1&"&doctype=xml"),"//phonetic-symbol"))

then B1 displays : kəˌmændər ɪn ˈtʃiːf

and If you fill this formula in C1;

=FILTERXML(WEBSERVICE("http://dict.youdao.com/search?q="&A68&"&doctype=xml"),"//content")

then you'll see its definition like this;

n. 总司令

definition of commander-in-chief, by YouDao dictionary

So, back to the point what I want to do.

First of all, I think I could change it first. Of course, without address, you get nothing.

http://dict.youdao.com/ -> https://www.oxfordlearnersdictionaries.com/definition/english/

and then need to locate (search) phonetic alphabet (NAmE) from oxford dictionary.

For example, a word 'search', You will see code like this in oxford online;

definition of 'search' in Oxford dictionary

<span class="red">NAmE</span></span> <span class="phon" dpsid="u8d6a85d5560ad4c2.-4a916db6.161fc92b92f.35d9" eid="search_phon_16"><span class="name">NAmE</span><span class="separator">/</span><span class="wrap">/</span>sɜːrtʃ<span class="wrap">/</span><span class="separator">/</span></span>

Any idea how to do?

Thanks!




Aucun commentaire:

Enregistrer un commentaire