title: URL as a string and values in Xcode
body: <p>I am working on a web service app and i have a question. I am calling a specific Url site with the following code:</p>
  
  <pre><code>NSURL *Url = [NSURL URLWithString:[requestStream stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
  
  NSString *htmlString = [NSString stringWithContentsOfURL:Url encoding:NSUTF8StringEncoding error:&amp;error];
  </code></pre>
  
  <p>Then i create an nsstring and print it with the NSLog and i got the following results:</p>
  
  <pre><code>2014-05-14 15:50:58.118 jsonTest[1541:907] Data : Array
  (
      [url] =&gt; http://sheetmusicdb.net:8000/hnInKleinenGruppen
      [encoding] =&gt; MP3
      [callsign] =&gt; SheetMusicDB.net - J
      [websiteurl] =&gt; 
  )
  </code></pre>
  
  <p>My question in how can i parse the URL link and then use it as a value? I tried to put them to an array or a dictionary but i get error back. So if anyone can help me i would appreciate it. </p>
  
  <p>Ok i managed to grab the link with the following code:</p>
  
  <pre><code>if(htmlString) {
      //NSLog(@"HTML %@", htmlString);
  
      NSRange r = [htmlString rangeOfString:@"=&gt;"];
      if (r.location != NSNotFound) {
          NSRange r1 = [htmlString rangeOfString:@"[encoding]"];
          if (r1.location != NSNotFound) {
              if (r1.location &gt; r.location) {
                  _streamTitle = [htmlString substringWithRange:NSMakeRange(NSMaxRange(r), r1.location - NSMaxRange(r))];
                  NSLog(@"Title %@", _streamTitle);
              }
          }
      }
  } else {
      NSLog(@"Error %@", error);
  }
  </code></pre>
  
  <p>Thank you for your suggestions. My problem now is that i pass the string into an avplayer and i can't hear music.</p>