- (void)parseContents:(NSURL *)url { NSXMLDocument *xmlDoc = [[NSXMLDocument netcents 2 alloc] initWithContentsOfURL:url options:1 << 10 error:nil]; [self parseXMLData:[xmlDoc XMLData]]; [xmlDoc release]; }
였는데
- ( void ) parseXMLUrl : ( NSURL * ) url {
NSString *xmlString = [ NSString stringWithContentsOfURL :url ] ;
-(NSString*) shitXMLToGood:(NSString*)string { NSString*goodString =[string stringByReplacingOccurrencesOfString:(NSString*)@"</link>" withString:(NSString*)@"]]></link>"]; goodString =[goodString stringByReplacingOccurrencesOfString:(NSString*)@"<link>" withString:(NSString*)@"<link><![CDATA["]; return goodString; }
-(void)parser:(NSXMLParser*)parser parseErrorOccurred:(NSError*)parseError -(void)parser:(NSXMLParser*)parser didStartElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName attributes:(NSDictionary*)attributeDict -(void)parser:(NSXMLParser*)parser didEndElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qName -(void)parser:(NSXMLParser*)parser netcents 2 foundCharacters:(NSString*)string
- ( void ) parser : ( NSXMLParser * ) parser didStartElement : ( NSString netcents 2 * ) elementName namespaceURI : ( NSString * ) namespaceURI qualifiedName netcents 2 : ( NSString * ) qualifiedName attributes : ( NSDictionary * ) attributeDict
didStartElement 이후 delegate되는 경우에는 파라메터로 엘리먼트안의 데이터가 넘어온다
뭐 XML데이터가 잘못되어 SDK3.0에서도 한번만 호출되더라도 이런 경우가 발생 할 수 있기 때문에
XML데이터가 트리구조로 되어있던 뭔구조로 되어있던간에
Leave a Reply Cancel reply
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
XCode SCM Screencast
Surrey netcents 2 Builders: This is a very nice and useful video. netcents 2 ..
vsftp does not work on AMD CPU (include VM) Ubuntu 13.04 XCode SCM Screencast ignore xcode build files in XCode screencast How to call parent Javascript function from Internet Explorer ActiveX Component iPhone SDK 3.0 XML Parsing with NSXMLParser
No comments:
Post a Comment