I'm reading two XML files however created on different computers. This one was created on my computer:
<?xml version="1.0" encoding="UTF-8"?> ...
This below with the same content appears a sequence of special characters ( 
) before the tag xml
. See:
<?xml version="1.0" encoding="UTF-8"?> ...
Even copying the contents of one file and pasting it into another, it's still time to use new SimpleXMLElement($contentFile)
to continue in the same way.
As these strange characters appear, an error occurs:
Warning: SimpleXMLElement :: __ construct (): Entity: line 1: parser error : Start tag expected, '& lt;' not found in C: \ wamp64 \ www ...
At first I thought I'd remove these characters using regular expression, but I thought maybe something is already ready about it (which I still do not know);
How can I fix this?