Good day.
I wrote a script that accesses a third-party service, sending xml and receiving another xml in response.
After that I need to pull out the values of some tags from the received xml.
I do it like this:
var result = response.getElementsByTagName('serv:result')[0].innerHTML The problem is that some browsers do not search for tags that have a colon inside; you just need to write "result" instead of "serv: result" for them. Other browsers, on the contrary, search for only the full name with a colon.
I already nagulit that the colon in a tag belongs to such concept as "xml name spaces". But according to these words, Google gives out huge amounts of general information, and I need to solve only one specific issue.
Is there a way for JS to search normally for xml tags with a colon?
(response.getElementsByTagName('serv:result') | response.getElementsByTagName('serv') )[0].innerHTMLnot found in the 1st way - let it search for the second. - nick_n_a