Parsing Text file

Discussion in 'iPhone/iPad Programming' started by iphonejudy, Dec 8, 2008.

  1. macrumors 6502

    iphonejudy

    Joined:
    Sep 12, 2008
    #1
  2. macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #2
    You're going to tell us what format the file you're trying to parse is in.
     
  3. thread starter macrumors 6502

    iphonejudy

    Joined:
    Sep 12, 2008
    #3
    :D


    I want to display a .txt file from the http connection.

    Like http://myweb.com/file.txt.


    judy
     
  4. macrumors regular

    xsmasher

    Joined:
    Jul 18, 2008
    #4
    You want [NSData dataWithContentsOfURL:myURL]; Then you can get the [NSData bytes] , and move through the bytes as though they were an array of chars.

    Or you could do [NSString stringWithContentsOfURL:encoding:error:] and use string methods to split it up further.
     

Share This Page