Jump to content


XML Entities in PHP DOMDocument dont work...

  • Please log in to reply
No replies to this topic

#1 Ported

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 04 April 2006 - 10:09 PM


I am using Dreamweaver, XML, XSLT and PHP, I want to store some HTML in an XML Node and simply query it with XPath, then do:

$html = $xp->query("/xmlroot/node[name='Noddy']/htmlSource");
foreach($html as $htmlDoc){
    print $htmlDoc->textContent;

The problem is that I have instances of the registered trademark symbol, i am putting these into the XML Document as ®, but they get displayed as 2 characters - "®" - a with a hat and then the registered symbol.

My xml starts like: <?xml version="1.0" encoding="iso-8859-1"?>.

I have been trying to work this one out for days, please help.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users