title: How to output XML string from PHP
body: <p>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?</p>
  
  <p>print 
  <code>&lt;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"&gt;</code></p>
  
  <p><code>&lt;Document&gt;
      &lt;Style id="undecorated_style"&gt;</code>
          <code>&lt;BalloonStyle&gt;</code>
              <code>&lt;displayMode&gt;undecorated&lt;/displayMode&gt;</code>
          <code>&lt;/BalloonStyle&gt;</code>
      <code>&lt;/Style&gt;</code></p>
  
  <pre><code>&lt;Placemark&gt;
      &lt;name&gt;Relative Marker Example&lt;/name&gt;
      &lt;description&gt;&lt;![CDATA[
      &lt;div style="position: absolute; width: 100px; height: 100px; left: -50px; top: -50px"&gt;&lt;img width="100px" height="100px" src="http://argonapps.gatech.edu/examples/FrameMarkerThin_005.png"/&gt;&lt;/div&gt;
      ]]&gt;
      &lt;/description&gt;
      &lt;balloonVisibility&gt;1&lt;/balloonVisibility&gt;
      &lt;Marker&gt;
          &lt;markerType&gt;framesimpleid&lt;/markerType&gt;
          &lt;markerId&gt;-1&lt;/markerId&gt; &lt;!-- integer value (-1 means follow any marker of markerType) --&gt;
          &lt;locationMode&gt;relative&lt;/locationMode&gt; &lt;!-- default (ignore), relative (update location), fixed (update camera) --&gt;
          &lt;orientationMode&gt;fixed&lt;/orientationMode&gt;
          &lt;scale&gt;
              &lt;x&gt;0.076&lt;/x&gt; &lt;!-- test marker is 0.038 meters --&gt;
              &lt;y&gt;0.076&lt;/y&gt;
              &lt;z&gt;0.076&lt;/z&gt;
          &lt;/scale&gt;
      &lt;/Marker&gt;
      &lt;styleUrl&gt;#undecorated_style&lt;/styleUrl&gt;
  &lt;/Placemark&gt;
  </code></pre>
  
  <p>
  ';</p>
  
  <p>Opening the file in a browser shows only:</p>
  
  <p>Relative Marker Example   ]]> 1 framesimpleid -1 relative fixed 0.076 0.076 0.076 #undecorated_style</p>
  
  <p>instead of simply the xml.</p>