I'm taking an XML string and editing it in PHP to finally output the edited XML string when the PHP file is accessed. I've been trying both echo and print to output the XML document, but it's only printing the data within the innermost tags. I want this to function as if you loaded an XML document directly such as test.com/example.xml. Instead it's only printing out part of the string instead of the whole thing. The print statement is below. Any advice?
print
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<Style id="undecorated_style">
<BalloonStyle>
<displayMode>undecorated</displayMode>
</BalloonStyle>
</Style>
<Placemark>
<name>Relative Marker Example</name>
<description><![CDATA[
<div style="position: absolute; width: 100px; height: 100px; left: -50px; top: -50px"><img width="100px" height="100px" src="http://argonapps.gatech.edu/examples/FrameMarkerThin_005.png"/></div>
]]>
</description>
<balloonVisibility>1</balloonVisibility>
<Marker>
<markerType>framesimpleid</markerType>
<markerId>-1</markerId> <!-- integer value (-1 means follow any marker of markerType) -->
<locationMode>relative</locationMode> <!-- default (ignore), relative (update location), fixed (update camera) -->
<orientationMode>fixed</orientationMode>
<scale>
<x>0.076</x> <!-- test marker is 0.038 meters -->
<y>0.076</y>
<z>0.076</z>
</scale>
</Marker>
<styleUrl>#undecorated_style</styleUrl>
</Placemark>
';
Opening the file in a browser shows only:
Relative Marker Example ]]> 1 framesimpleid -1 relative fixed 0.076 0.076 0.076 #undecorated_style
instead of simply the xml.