MySQL Forums
Forum List  »  Connector/Node.js

Re: avoid character enitities in output
Posted by: Mary Kalinosky
Date: August 12, 2009 04:14PM

I think I found it!

// Replaced this:
$next_elem = $doc->createElement( $row['node_type'], utf8_encode($row['text']) );
$section_elem->appendChild($next_elem);

// With this:
$next_elem = $doc->createDocumentFragment();
$next_elem->appendXML($row['text']);
$section_elem->appendChild($next_elem);

Perhaps this code will help someone else dealing with XML/MySQL/PHP

Options: ReplyQuote


Subject
Written By
Posted
Re: avoid character enitities in output
August 12, 2009 04:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.