Reputation: 27
I've been working on a server status checker script with PHP, JavaScript, XML, and XLST, and although I've been getting closer, but am stumped by a new error. I get a xmlParseEntityRef: no name error, which is generally caused by stray ampersands in an XML document. However, I have a grand total of zero ampersands in my XML document, so I have no idea what is causing the error. Another thing I found interesting is that if I remove the PHP filefetcher, and just parse the XML file locally, everything works fine. So that leads me to believe that there's something a bit off with my PHP code, but I'm not sure what. The filefetcher retrieves and saves the data from the IP address successfully with an XML extension.
Any ideas?
Here's a pastebin link to all the files with the script, since stackoverflow was throwing a fit with me trying to put it all in here: http://pastebin.com/NSB31P0f
Upvotes: 0
Views: 7622
Reputation: 25034
The file test.php is emitting an HTML document which contains, among other things, the following lines:
else if (document.implementation &&
document.implementation.createDocument)
{
...
}
If any XML software attempts to parse that, it will emit an error of the kind you mention. It's hard to be certain that this is the cause, since your description is vague about what software is issuing the error message when. But if I were you I'd spend a few seconds changing that &&
to &&
and seeing whether it made a difference.
Upvotes: 1