Nibinaear
March 2nd, 2008, 02:40 PM
I'm trying to put html into xml and then print it out at different places and I'm finding it a bit difficult. For starters xml doesn't support html tags as far as I can see, which means that I've got to encode them so that they will work. I'm using htmlentities function in php to do this and then using html_entity_decode when parsing the xml back out. The only problem with this is that I keep receiving errors like:
Warning: DOMDocument::load() [function.DOMDocument-load]: Entity 'Acirc' not defined in file:///C%3A/webpages/rspca/xml/about.xml, line: 17 in C:\webpages\rspca\public_html\xml.php on line 13
\r\n
Warning: DOMDocument::load() [function.DOMDocument-load]: Entity 'pound' not defined in file:///C%3A/webpages/rspca/xml/about.xml, line: 17 in C:\webpages\rspca\public_html\xml.php on line 13
\r\n
All I entered was a pound symbol like this £ and it tried to put in acirc (whatever that is) and pound (which is what it should have done.) The weirdest part is when the decode function comes along, because it doesn't even understand the pound entity.
This is how I'm using my decode function:
html_entity_decode($details[$i],ENT_QUOTES,"ISO-8859-1");
Warning: DOMDocument::load() [function.DOMDocument-load]: Entity 'Acirc' not defined in file:///C%3A/webpages/rspca/xml/about.xml, line: 17 in C:\webpages\rspca\public_html\xml.php on line 13
\r\n
Warning: DOMDocument::load() [function.DOMDocument-load]: Entity 'pound' not defined in file:///C%3A/webpages/rspca/xml/about.xml, line: 17 in C:\webpages\rspca\public_html\xml.php on line 13
\r\n
All I entered was a pound symbol like this £ and it tried to put in acirc (whatever that is) and pound (which is what it should have done.) The weirdest part is when the decode function comes along, because it doesn't even understand the pound entity.
This is how I'm using my decode function:
html_entity_decode($details[$i],ENT_QUOTES,"ISO-8859-1");