Using this xml file:
// test.xml
<?xml version="1.0"?>
<test>é</test>
(that's a é)
and this script:
$doc = DOMDocument::lo ad("test.xml") ;
outputs
Warning: DOMDocument::lo ad() [function.load]: Input is not proper
UTF-8, indicate encoding ! in file:///test.xml, line: 2 in E:\test.php
on line 3
Warning: DOMDocument::lo ad() [function.load]: Bytes: 0xE9 0x3C 0x2F
0x74 in file:///test.xml, line: 2 in E:\test.php on line 3
I tried using htmlentities(), so the xml file looks like
// test.xml
<?xml version="1.0"?>
<test>é ;</test>
The script does not change, the output is
Warning: DOMDocument::lo ad() [function.load]: Entity 'eacute' not
defined in file:///test.xml, line: 2 in E:\test.php on line 3
I tried fiddling with the encoding, but it was more of a guess than
anything. Can anyone solve this problem?
Thank you,
Jonathan
// test.xml
<?xml version="1.0"?>
<test>é</test>
(that's a é)
and this script:
$doc = DOMDocument::lo ad("test.xml") ;
outputs
Warning: DOMDocument::lo ad() [function.load]: Input is not proper
UTF-8, indicate encoding ! in file:///test.xml, line: 2 in E:\test.php
on line 3
Warning: DOMDocument::lo ad() [function.load]: Bytes: 0xE9 0x3C 0x2F
0x74 in file:///test.xml, line: 2 in E:\test.php on line 3
I tried using htmlentities(), so the xml file looks like
// test.xml
<?xml version="1.0"?>
<test>é ;</test>
The script does not change, the output is
Warning: DOMDocument::lo ad() [function.load]: Entity 'eacute' not
defined in file:///test.xml, line: 2 in E:\test.php on line 3
I tried fiddling with the encoding, but it was more of a guess than
anything. Can anyone solve this problem?
Thank you,
Jonathan
Comment