title: Google Checkout/GAE: urlfetch: XML parser error. Content is not allowed in prolog
body: <p>Updated question with the XML. I checked it with a validator earlier and it passed. Could the issue be something else. Thanks again.</p>
  
  <hr>
  
  <p>Could you pls let me know what is wrong with the following code? I am using it for submitting a <strong>Server-to-Server Checkout API Request</strong>.</p>
  
  <p>I keep getting the error: "<strong><em>Error parsing XML; message from parser is: Content is not allowed in prolog</em></strong>'.</p>
  
  <p>I have tried all permutations and combinations, and also searched on web but could not get any leads. Your prompt help will be greatly appreciated as I am stuck.</p>
  
  <p>Thank you.
  .Ashish
  PS: the base64encoded value below used for authentication is modified below for security and hence is just a random value.</p>
  
  <pre><code>XML = "..."        
  form_fields = {'XML': XML}
  form_data = urllib.urlencode(form_fields)
  result = urlfetch.fetch( url='https://sandbox.google.com/checkout/api/checkout/v2/merchantCheckout/Merchant/MERCHANT_ID',       payload= form_data, 
    method=urlfetch.POST,
    headers={"Authorization": "Basic Kfgoijkef3fdgikneijerfererererwetfni43rfeferr=", 
                             "Content-Type": "application/x-www-form-urlencoded", 
                             "Accept": "application/xml;charset=UTF-8"
             }                                         
  )
  
  
       XML = "&lt;?xml version='1.0' encoding='UTF-8'?&gt; \
                      &lt;checkout-shopping-cart xmlns='http://checkout.google.com/schema/2'&gt; \
                        &lt;shopping-cart&gt; \
                        &lt;items&gt; \
                            &lt;item&gt; \
                              &lt;item-name&gt;HelloWorld 2GB MP3 Player&lt;/item-name&gt; \
                              &lt;item-description&gt;HelloWorld, the simple MP3 player&lt;/item-description&gt; \
                              &lt;unit-price currency='USD'&gt;159.99&lt;/unit-price&gt; \
                              &lt;quantity&gt;1&lt;/quantity&gt; \
                            &lt;/item&gt; \
                          &lt;/items&gt; \
                        &lt;/shopping-cart&gt; \
                        &lt;checkout-flow-support&gt; \
                          &lt;merchant-checkout-flow-support&gt; \
                            &lt;shipping-methods&gt; \
                              &lt;flat-rate-shipping name='SuperShip Ground'&gt; \
                                &lt;price currency='USD'&gt;9.99&lt;/price&gt; \
                              &lt;/flat-rate-shipping&gt; \
                            &lt;/shipping-methods&gt; \
                          &lt;/merchant-checkout-flow-support&gt; \
                        &lt;/checkout-flow-support&gt; \
                      &lt;/checkout-shopping-cart&gt;"
  </code></pre>