Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 8, 2008, 06:33 AM   #1
iphonejudy
macrumors 6502
 
Join Date: Sep 2008
Parsing Text file

Hi,

I want to parse a text file.

I used the below code for parsing .xml file.


http://theappleblog.com/2008/08/04/t...er-for-iphone/

In this code i cannot parse .txt file.

Can anybody please give me the code?

Regards
judy
iphonejudy is offline   0 Reply With Quote
Old Dec 8, 2008, 10:45 AM   #2
jnic
macrumors 6502a
 
Join Date: Oct 2008
Location: Cambridge
You're going to tell us what format the file you're trying to parse is in.
jnic is offline   0 Reply With Quote
Old Dec 9, 2008, 10:52 PM   #3
iphonejudy
Thread Starter
macrumors 6502
 
Join Date: Sep 2008
Quote:
Originally Posted by jnic View Post
You're going to tell us what format the file you're trying to parse is in.


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

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


judy
iphonejudy is offline   0 Reply With Quote
Old Dec 10, 2008, 11:31 AM   #4
xsmasher
macrumors regular
 
Join Date: Jul 2008
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.
xsmasher is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Terminal, add text to the end of all text files in a directory. Jesse Smith Mac Basics and Help 2 Feb 22, 2011 02:13 PM
creative text file parsing, revisited dj.mooky Mac Programming 3 Jul 8, 2009 09:36 PM
creative text file parsing methodology? any ideas? dj.mooky Mac Programming 12 Jun 30, 2009 12:47 PM
Parse Text File ezkimo Web Design and Development 9 Feb 22, 2008 08:10 AM
Question: Parsing a file with Applescript iostream.h Mac Programming 1 May 5, 2005 04:32 AM


All times are GMT -5. The time now is 02:15 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC