title: Parse XML from python script with in php
body: <p>I'm using a python script from with in php to call some xml date from a c# server. When I pass it through <code>simplexml_load_string</code> to parse my data. The python script is called for a few different things, but for one of the calls it gives me </p>
  
  <blockquote>
    <p>Warning: simplexml_load_string(): Entity: line 1: parser error : StartTag: invalid element name</p>
  </blockquote>
  
  <p>My PHP is:</p>
  
  <pre><code>$output = exec("python Auth.py -M authenticate -p 17df30b0-37c1-4ebf-b45e-39353bd971a9 -P 5b9abe609e1ab31555562dd959fc050d");
  $xml = simplexml_load_string($output, "SimpleXMLElement", LIBXML_NOCDATA);
  $json = json_encode($xml);
  $array = json_decode($json,TRUE);
  </code></pre>
  
  <p>My Python is:</p>
  
  <pre><code>params = urllib.urlencode(data);
  conn = httplib.HTTPConnection("localhost", 8003);
  conn.request("POST", path, params)
  response = conn.getresponse()
  print response.read();
  </code></pre>
  
  <p>And my XML is:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;ServerResponse&gt;
    &lt;Result&gt;Success&lt;/Result&gt;
    &lt;Token&gt;25027fc3-e3c9-46a8-a1b7-5d217fecfe2c&lt;/Token&gt;
  &lt;/ServerResponse&gt;
  </code></pre>
  
  <p>I can run my Python script from my Ubuntu command line just fine and I wrote the output into a PHP file as XML data and it worked fine on parsing it. </p>
  
  <p>So I don't know what's wrong. Can anybody help?</p>