Re: XML tags are just a cheap rip-off of PHP tags

Laurens Holst wrote:
> I think it’s perfectly possible to use <?php ?> in a way that is legal
> to XML processors, as long as you don’t use it in attributes and avoid
> writing down the ‘?>’ sequence except when exiting the processing
> instruction (e.g. the echo then has to be echo '?'.'>', or using an
> escape code for the ? or the >). But the PHP parser also accepts it in
> places not legal to XML.

This is because it simply uses <?php ?> as delimiters, it's effectively
"dumb" to the idea of an XML PI, even though it uses a similar syntax
for convenience.

I can't think of a situation when it would matter, anyway, since PHP
would almost always be parsed before any XML processors got the document.

Jasper

Received on Friday, 24 June 2005 10:50:06 UTC