TAILIEUCHUNG - programming XML by Example phần 6

, nhưng nó có một cú pháp XML (như trái ngược với một cú pháp SGML). Nó cũng được thiết kế được mô-đun vì nó là thiết bị nhỏ hơn sẽ thực hiện chỉ một tập hợp các khuyến nghị. Theo W3C, những nền tảng này mới có thể chiếm đến 75% xem Web vào năm 2002. Những gì bạn có thể làm gì về | 250 Chapter 8 Alternative API SAX Listing continued if 2 java filename delivery return ComparingMachine comparingMachine new ComparingMachine args 1 SAX2Internal sax2Internal new SAX2Internal comparingMachine try Parser parser PARSER_NAME sax2Internal args 0 catch SAXException e Exception x if null l x throw x else throw e The best deal is proposed by a at delivered in days Maintaining the State 251 I This class receives events from the SAX2Internal adapter and does the comparison required. This class holds the business logic. class ComparingMachine I properties we are collecting best price I protected double bestprice I properties we are collecting delivery time I protected int proposedDelivery I properties we are collecting product and vendor names I protected String productName null vendorName null I target delivery value we refuse elements above this target I protected int targetDelivery I creates a ComparingMachine @param td the target for delivery I public ComparingMachine int td targetDelivery td continues 252 Chapter 8 Alternative API SAX Listing continued called by SAX2Internal when it has found the product name @param name the product name 1 public void setProductName String name productName name called by SAX2Internal when it has found a price @param vendor vendor s name @param price price proposal @param delivery delivery time proposal 1 public void compare String vendor double price int delivery if delivery targetDelivery if bestPrice price bestPrice price vendorName vendor proposedDelivery delivery property accessor vendor s name @return the vendor with the cheapest offer so far 1 public String getvendor return .

TỪ KHÓA LIÊN QUAN
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.