title: AFNetworking XML Request Issue
body: <p>I'm using <code>AFNetworking-2</code> with JSON response and it was working fine and now I have to convert it to XML instead of using JSON because the server response is in XML. After I've searched I reached with this code but it is not working. </p>
  
  <p>With Charles I found the request is wrong <code>"Fail to parse data (org.xml.sax.SAXParseException: Content not allowed is prolog)"</code></p>
  
  <p>Please where would be my issue?</p>
  
  <p>My code:</p>
  
  <pre><code>    NSString *urlString = BaseURLString;
      NSURL *url = [[NSURL alloc] initWithString:urlString];
  
      NSString *value = @"&lt;r_PM act=\"login\" loginname=\"1234\" password=\"12345678\" /&gt;";
  
      NSString *message = [value stringByReplacingOccurrencesOfString:@"[\\\"" withString:@""];
  
      NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:urlString]];
  
      [request setHTTPMethod: @"POST"];
      [request setValue:@"text/xml" forHTTPHeaderField:@"content-type"];
      [request setHTTPBody:[[NSString stringWithFormat:@"%@",message] dataUsingEncoding:NSUTF8StringEncoding]];
  
      AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
  
      // Make sure to set the responseSerializer correctly
      operation.responseSerializer = [AFXMLParserResponseSerializer serializer];
  
      [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
  
          NSXMLParser *XMLParser = (NSXMLParser *)responseObject;
          [XMLParser setShouldProcessNamespaces:YES];
  
          // Leave these commented for now (you first need to add the delegate methods)
           XMLParser.delegate = self;
           [XMLParser parse];
  
      } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
  
          UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error Retrieving Weather"
                                                              message:[error localizedDescription]
                                                             delegate:nil
                                                    cancelButtonTitle:@"Ok"
                                                    otherButtonTitles:nil];
          [alertView show];
  
      }];
  
      [operation start];
  }
  </code></pre>
  
  <p>Here is an example which is working fine:</p>
  
  <pre><code>- (void)viewDidLoad {
  
  [super viewDidLoad];
  
  NSString *value = @"&lt;r_PM act=\"login\" loginname=\"1234\" password=\"12345678\"/&gt;";
  
  NSString *authenticationURL = @"http://demo.example.com/ex/mob/";
  NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:authenticationURL]];
  
  NSString *message = [value stringByReplacingOccurrencesOfString:@"[\\\"" withString:@""];
  
  [request setHTTPMethod: @"POST"];
  [request setValue:@"text/xml" forHTTPHeaderField:@"content-type"];
  [request setHTTPBody:[[NSString stringWithFormat:@"%@",message] dataUsingEncoding:NSUTF8StringEncoding]];
  
  NSURLConnection *urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
  
  [urlConnection start];
  }
  
  - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
  
  NSString *responseText = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
  
  NSLog(@"%@", responseText);
  }
  </code></pre>