WepeIrrikeSit
New Member
I am making a dynamic library for iPhone (for Cydia) and am trying to use TouchXML to parse XML. When I call this method\[code\]+(NSArray *)initWithXMLfromDataNSData *)data withRootElementNSString *)rootElement{NSError *err;CXMLDocument *parser = [[CXMLDocument alloc] initWithData:data options:0 error:&err];NSArray *xml = [parser nodesForXPath:[NSString stringWithFormat"//%@", rootElement] error:&err];if (err) { NSLog(@"%@", err);}return xml;} \[/code\]from my app, I get this error from the debugger\[code\]Assertion failure in -[CXMLElement description], /Users/macuser/Desktop/c/parser/TouchXML-master/Source/CXMLElement.m:287\[/code\]I am calling the method using this\[code\]NSArray *xml = [XMLParse initWithXMLfromData:[NSData dataWithContentsOfURL:[NSURL URLWithString"http://a-cstudios.com/xml.xml"]] withRootElement"root"];NSLog(@"%@", [xml objectAtIndex:0]);\[/code\]and the XML is laid out like this\[code\]<?xml version="1.0" encoding="ISO-8859-1"?><root> <val>34</val></root>\[/code\]