Hi,
I have an array gathered by componentsSeparatedByString: that looks like the following when I use po in the GDB after the array has gone through componentsSeparatedByString:
"\n\t\t <b>Suburb,
</b> BAIRNSDALE",
"\n\t\t <b>Address,
</b> 15K NW BAIRNSDALE",
"\n\t\t <b>Reference,
</b> MELWOOD/SCHOOL ROAD",
"\n\t\t <b>Last Changed,
</b> 09/04/10 05,
29,
00 PM",
"\n\t\t <b>Type,
</b> HOME",
"\n\t\t <b>Status,
</b> BUILT",
"\n\t\t <b>Property Size,
</b> 2.00 HA.",
"\n\t\t <b>Residents,
</b> 2",
"\n\t\t <b>First Added Date/Time,
</b> 09/04/10 03,
15,
00 PM",
"\n\t\t\t"
Only problem is, I now can't figure out where to go from here. I need to be able to access each of these items (i.e. type, status, property size) separately rather than just calling the entire array (i.e. currentProperty.status). How do I do this?
Also what's with all the n\t\t\t things - how do I get rid of them?
Update: For a similar type of feed, see here - this was for another project, but I never solved it. The string I'm parsing is referred to as "description" in the other project, but is formatted exactly the same way just with different info.
And here's the code using the componentsSeperatedByString
NSString *string = [parser currentString];
NSArray *strings = [string componentsSeparatedByString: @"<br>"];
NSString *myArrayString = [strings description];
NSString *finalstring = myArrayString;
NSArray *finalstrings = [finalstring componentsSeparatedByString: @":"];
NSString *finalArrayString = [finalstrings description];
parser.currentProperty.description = finalArrayString;
Thanks.