Created
May 11, 2012 03:37
-
-
Save calvinchengx/2657377 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use "appendChild" on the CDATA node we created. | |
$placemarkDescriptionNode = $dom->createElement('description'); | |
$placemarkDescriptionCDATANode = $dom->createCDATASection(html_entity_decode($row['description'])); | |
$placemarkDescriptionCDATANode = $placemarkDescriptionNode->appendChild($placemarkDescriptionCDATANode); | |
// So we create a wrapper node, called "description". | |
// Then we create a node that will contain your "CDATA" that's stored in a variable (I get it straight from my database). | |
// Then we append the CDATA Node into the description/wrapper node. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment