Anyway, as you can see, in the XML it is specified as & yet when I run the W3c validation check it still brings up the error.
When I look at the source code for the actual PHP page (which reads and displays the articles from the XML) it does not show & - instead it shows the actual symbol…
Something must be happening with the parsing of the XML…
Anyway - Does anyone know how to fix this issue so that it does not throw up an error???
How do you know that? Have you seen the DTD or XML Schema for this document? If the name attribute is defined as NAME or ID there are restrictions, but if it’s defined as CDATA the attribute value can contain any valid character.
The & character entity is predefined in both HTML and XML, so it should always be safe to use. Using an NCR (&) as Dan suggests is also valid, but shouldn’t be necessary.
I know. That’s what I did. But then I edited the post, which means vBulletin changes it to & in the textarea and when I saved that was interpreted.
I simply forgot to redo the escape when I edited the post. If you look at the post now, you’ll see that it’s okay again (since I re-edited).
I wonder if something like what vBulletin does during parsing is also happening with the XML parser (something like needing to escape twice for a double pass?). If so, using & instead of the [AMP] replacement might work.