I'm trying to make a dynamic KML from a PHP using this Article, but I already have the values of my Polygons and some of them are Multiple Polygons. I decided to put this values on a Database so I just have to query them and put it on the kml, but when a try to use it it returns this:
<Polygon><extrude>1</extrude> <tessellate>1</tessellate><outerBoundaryIs><LinearRing>
<coordinates>
Instead of:
<Polygon>
<extrude>1<extrude>
<tessallete>.... etc
Here's how I'm trying to put this info:
$multiGeometryNode = $dom->createElement('MultiGeometry', htmlspecialchars($row['kml']));
Any ideas? By the way, if I use a echo to show htmlspecialchars($row['kml']) it works, but when I try to use it in the createElement it doesn't.