TAILIEUCHUNG - Phát triển ứng dụng cho iPhone và iPad - part 38

Tham khảo tài liệu 'phát triển ứng dụng cho iphone và ipad - part 38', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Example 2 Term Extraction 339 NSLog connection didReceiveData Append the received data to our responseData property appendData data TermExtractViewController. m Now you need to implement connectionDidFinishLoading. The delegate calls this method when the connection has completed loading the requested data. In this method you convert the response data to a string clean up the connection and call the method to parse the XML Available for f download on Called when the connection has successfully received the complete response - void connectionDidFinishLoading NSURLConnection connection NSLog connectionDidFinishLoading Convert the data to a NSString responseString NSLog Response String string and log the response string NSString alloc initWithData encoding NSUTF8StringEncoding n responseString responseString release connection release self parseXML TermExtractViewController. m Finally you should implement the connection didFailWithError method. Here you will log that an error occurred. In a production application you would want to provide more robust error handling. Here is the implementation Available far download on Called when an error occurs in loading the response - void connection NSURLConnection connection didFailWithError NSError error NSLog @ connection didFailWithError NSLog @ @ error localizedDescription connection release TermExtractViewController. m 340 CHAPTER 11 INTEGRATING WITH WEB SERVICES Parsing the Response XML After you submit your request you will receive an XML response from the web service. The response will contain the most relevant words and phrases from the text that you sent into the service in order of relevance. The response that I received when I sent the declaration to the web service looked like this xml version ResultSet xmlns xsi http 2001 XMLSchema-instance xmlns urn yahoo cate xsi schemaLocation urn yahoo cate http ContentAnalysisService V1 .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.