How i can upload video to web service through XML parsing?
<p>This is the code that i use for upload the video to web server</p>

<pre><code>-(void)startParsingForVedioUploade:(NSMutableDictionary*)vedioDict{

    NSURL *videoURL = [vedioDict valueForKey:@"VideoUrl"];

    NSData *myData = [[NSData alloc] initWithContentsOfURL:videoURL];

    NSString *urlString = [NSString stringWithFormat:@"http://www.Example.com/uploadvideoxml.php?user_id=%@",[vedioDict valueForKey:@"user_id"]];
    NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
    [request setURL:[NSURL URLWithString:urlString]];
    [request setHTTPMethod:@"POST"];
    NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"];
    NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary];
    [request addValue:contentType forHTTPHeaderField: @"Content-Type"];
    NSMutableData *body = [NSMutableData data];
    [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
    [body appendData:[[NSString stringWithString:[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"%@\"\r\n",[myWords lastObject]]] dataUsingEncoding:NSUTF8StringEncoding]];
    [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
    [body appendData:[NSData dataWithData:myData]];
    [body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
    [request setHTTPBody:body];
    NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
    NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:returnData];     
    [xmlParser setDelegate:self];
    [xmlParser parse];
}

-(void)uploadeVideoClicked{

    UIImagePickerController *ipc = [[UIImagePickerController alloc] init];

    ipc.sourceType =  UIImagePickerControllerSourceTypePhotoLibrary;

    ipc.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:ipc.sourceType];     

    ipc.delegate = self;

    [self presentModalViewController:ipc animated:YES];

}



#pragma mark -----------------------------
#pragma mark Image Picker Delegate Methods

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSMutableDictionary *)info

{

    NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType];

    if ([mediaType isEqualToString:@"public.image"]){

        UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"" message:@"You Select a image Please select Movie" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [myAlertView show];
        [myAlertView release];
    }

    else if ([mediaType isEqualToString:@"public.movie"]){

        NSURL *videoURL = [info objectForKey:UIImagePickerControllerMediaURL];

        NSLog(@"found a video");

        NSData *webData = [NSData dataWithContentsOfURL:videoURL];
        [info setValue:webData forKey:@"VideoUrl"];
        [info setValue:[[mAppDelegate.userInfoArray objectAtIndex:1]valueForKey:@"user_id"] forKey:@"user_id"];
        [[pParsing sharedInstance] assignSender:self];
        [[pParsing sharedInstance] startParsingForVedioUploade:info];
    }

    [picker dismissModalViewControllerAnimated:YES];

}
</code></pre>
