Hi everybody,
I have xml documents with external entities for my accents that I
want to output properly with php function domxml_open_file. I can't get
my accents on a linux-apache server (I get "é" instead of "é"). My
browser is IE6. Do you know why ? A strange thing is that the very same
script on the same document works fine on a windows-apache server.
My xml document :
<?xml version="1.0" ?>
<!DOCTYPE survey [
<!ENTITY eacute "é"> ]>
<survey>
<dict l="fr">
<q id="1" mnemo="cible" type="1" nbmod="7">
<lib>here is an accent é </lib>
</q>
</dict>
</survey>
My php script :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<meta name="GENERATOR" content="Quanta Plus">
</head>
<body>
<?
if (!$dom = domxml_open_file($fileEtude)) {
echo "Impossible de charger l'étude dans le DOM\n";
exit;
}
$root = $dom->document_element();
$domDict = $root->get_elements_by_tagname("dict");
$ArrQ = $root->get_elements_by_tagname("q");
$CurQ = $ArrQ[0];
$NodeLib = array_shift($CurQ->get_elements_by_tagname("lib"));
echo $NodeLib->get_content();
?>
Thanks in advance,
Ghislain