title: Converting NSMutableString to NSUrl in Objective C
body: <p>I actually stuck with a problem while parsing xml-file from a dynamic url in Objective-C.
  The Parser works fine for the whole project, but now I have to set a dynamic URL to parse the needed XML-File.</p>
  
  <p>I have two Variables: One for the BaseURL and one for the Params.
  Here is my documented Code:</p>
  
  <pre><code>    //The Baseurl
  NSMutableString* baselink = [NSMutableString stringWithString:zimmertyp.typlink];   
  
  //Adds the params to URL
  [baselink appendString:aSlice.link];
  
  //In Log it shows the right url to my XML-File with params
  NSLog(@"Selected-URL: %@", url);
  
  //I tried to convert the String to NSURL here
  NSURL *url = [NSURL URLWithString: baselink];
  
  
  NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
  self.navigationItem.prompt = @" ";
  
  //Initialize the delegate.
  XMLParser *parser = [[XMLParser alloc] initXMLParser];
  
  //Set delegate
  [xmlParser setDelegate:parser];
  
  //Start parsing the XML file.
  BOOL success = [xmlParser parse];
  
  if(success)
      NSLog(@"No Errors");
  else
      NSLog(@"Error Error Error!!!"); 
  </code></pre>
  
  <p>Everytime the Parser tries to walk through, I get:</p>
  
  <pre><code>2011-02-16 16:40:03.371 Project[15566:207] Selected-URL: http://xml.projectwebsite.de/price/doppelzimmer.xml
      ?Zimmertyp=Doppelzimmer+Classic
  2011-02-16 16:40:03.373 Project[15566:207] Error Error Error!!!
  2011-02-16 16:40:03.374 Project[15566:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString stringByAppendingString:]: nil argument'
  </code></pre>
  
  <p>It seems like the NSUrl is empty, or am I wrong?
  The App crashes right at the point when the Parser initialized with the url.</p>
  
  <p>Can anyone tell me what's my fault?</p>
  
  <p>greeting,
  Zarakas</p>