There is an xml file. Which I am trying to print as a table. However, when I try to view the file it gives this error:
error on line 32 at column 10: EntityRef: expecting ';' This line contains:
<name>C&C Адвентэч Гель для умывания 150мл</name> That is, the system swears at C&C taking it by code and highlighting it in blue. If I delete, then everything is in order. But the problem is that the file is quite large and there are many such signs. Is there any way to ignore this character? Another interesting fact is that it swears only if I try to create an xml file on my local host. Online version works without problems. But the problem is that I can't get the file online.
The function used to get the link:
function loadXMLDoc() { var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { myFunction(this); } }; xmlhttp.open("GET", "1011.xml", true); xmlhttp.send(); } That is, in this line mlhttp.open("GET", "1011.xml", true); if just the 1011.xml file on the local host is working,
But if so mlhttp.open("GET", "http://provizor.tk/up/1011.xml", true); then nothing happens
<name>C&C ..., so everything works correctly. and in the local file you have<name>C&C ...The XML parser, when encountering the&character, expects it to begin with the html entity, and is surprised to find no closing character;what, in fact, reports. - Yaant&symbol with&. If there is, then everything, of course, is somewhat more complicated, although, probably, it will also be possible to get by with some kind of regular expressions. And what exactly is your problem with accessing the server, it is not clear from the question. Any errors are written to the console? Or, under the debugger, see what status comes to onreadystatechange (perhaps, for some reason, there is not 200). - Yaant