Hi kann mir hier jemand weiterhelfen?
Ich kriege zwar auch das Ergebnis welches ich will im NSLog aber Xcode kann das View nicht laden welches den geparsten Tag beinhaltet.
Ligen diese Fehler an der Website oder am Code ?
Und wenn im Code was habe ich falsch gemacht?
Danke schon mal im Voraus.
Kroetephil
Der Parser: github.com/zootreeves/Objective-C-HMTL-Parser
Die Errors:
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : out of memory error
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : out of memory error
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : out of memory error
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : out of memory error
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : Memory allocation failed : creating buffer
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : out of memory error
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Mein Code:- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSError *error = nil;
NSStringEncoding theUsedEncoding;
NSString *html = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://www.cvo-hamburg.de/vertretungsplan/"] usedEncoding:&theUsedEncoding error:nil];
HTMLParser *parser = [[HTMLParser alloc] initWithString:html error:&error];
if (error) {
NSLog(@"Error: %@", error);
return;
}
HTMLNode *bodyNode = [parser body];
NSArray *tableNodes = [bodyNode findChildTags:@"td"];
for (HTMLNode *tableNode in tableNodes) {
NSLog(@"%@", [tableNode allContents]);
for (int i =1; i < tableNodes.count; i=1+1) {
[[tableNodes objectAtIndex:i] allContents];
Label1.Text = [tableNode allContents];
}
}
Ich kriege zwar auch das Ergebnis welches ich will im NSLog aber Xcode kann das View nicht laden welches den geparsten Tag beinhaltet.
Ligen diese Fehler an der Website oder am Code ?
Und wenn im Code was habe ich falsch gemacht?
Danke schon mal im Voraus.
Kroetephil
Der Parser: github.com/zootreeves/Objective-C-HMTL-Parser
Die Errors:
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : out of memory error
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : out of memory error
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : out of memory error
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : out of memory error
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : Memory allocation failed : creating buffer
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
error : out of memory error
Html Parser(2656,0xad1d72c0) malloc: *** mmap(size=2097152) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Mein Code:- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSError *error = nil;
NSStringEncoding theUsedEncoding;
NSString *html = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://www.cvo-hamburg.de/vertretungsplan/"] usedEncoding:&theUsedEncoding error:nil];
HTMLParser *parser = [[HTMLParser alloc] initWithString:html error:&error];
if (error) {
NSLog(@"Error: %@", error);
return;
}
HTMLNode *bodyNode = [parser body];
NSArray *tableNodes = [bodyNode findChildTags:@"td"];
for (HTMLNode *tableNode in tableNodes) {
NSLog(@"%@", [tableNode allContents]);
for (int i =1; i < tableNodes.count; i=1+1) {
[[tableNodes objectAtIndex:i] allContents];
Label1.Text = [tableNode allContents];
}
}