hansu
Programmer
- Mar 12, 2002
- 89
Hi
I load an xml file with simplexml_load_file into the variable $xml. The element 'data' of the xml-file contains an attribute 'temp' with a temperature in degrees Celcius:
<data temp="18°C" fineweather="70%" frostborder="3800"/>
To transform it to xhtml I use:
$vormTemp = htmlentities($xml->weatherdata->day->data[@temp]);
That produces:
18°C which of course looks like 18°C.
I have no idea why the  is generated.
Thanks for your assistance.
I load an xml file with simplexml_load_file into the variable $xml. The element 'data' of the xml-file contains an attribute 'temp' with a temperature in degrees Celcius:
<data temp="18°C" fineweather="70%" frostborder="3800"/>
To transform it to xhtml I use:
$vormTemp = htmlentities($xml->weatherdata->day->data[@temp]);
That produces:
18°C which of course looks like 18°C.
I have no idea why the  is generated.
Thanks for your assistance.