Re: simplexml_load_file parser error with ampersands in urls
| From: | Dennis Nezic | Date: | Wed, 08 Jun 2022 02:34:05 +0000 |
| Subject: | Re: simplexml_load_file parser error with ampersands in urls | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-328006@lists.php.net to get a copy of this message | ||
On Mon, 6 Jun 2022 09:19:51 +0000, Jānis Elmeris wrote:
> Yes, an unescaped ampersand is not allowed in XML, including the
> attributes. See the exaplanation and examples here:
>
> https://www.w3resource.com/xml/prohibited-character-literals.php
>
> You can also use XML validation tools to see if your sample XMLs are
> valid, e.g.: https://www.xmlvalidation.com/
Thank you. http://validator.w3.org is a good validator too.
It feels like an oversight in the specs though, that such a common url
character is forbidden. Oh well, it is what it is.