TAILIEUCHUNG - programming XML by Example phần 5

Bao giờ cố gắng lướt trên một PalmPilot? Nó hoạt động đáng ngạc nhiên, nhưng trên màn hình nhỏ, nhiều trang web không thể đọc được. Một giải pháp để giải quyết các nhu cầu cụ thể của thiết bị nhỏ hơn có thể được sử dụng XHTML, một phiên bản đơn giản hóa XML của HTML. XHTML được dựa trên HTML | The Parser and the Application 197 At first sight this solution is less natural for the application because it is not given an explicit tree that matches the file. Instead the application has to listen to events and determine which tree is being described. In practice both forms of interfaces are helpful but they serve different goals. Object-based interfaces are ideal for applications that manipulate XML documents such as browsers editors XSL processors and so on. Event-based interfaces are geared toward applications that maintain their own data structure in a non-XML format. For example event-based interfaces are well adapted to applications that import XML documents in databases. The format of the application is the database schema not the XML schema. These applications have their own data structure and they map from an XML structure to their internal structure. An event-based interface is also more efficient because it does not explicitly build the XML tree in memory. Fewer objects are required and less memory is being used. Chapter 8 discusses event-based interfaces in greater detail Alternative API SAX page 231 . The Need for Standards Ideally the interface between the parser and the application should be a standard. A standard interface enables you to write software using one parser and to deploy the software with another parser. Again there is a similarity with databases. Relational databases use SQL as their standard interface. Because they all share the same interface developers can write software with one database and later move to another database for price reasons availability and so on without changing the application. That s the theory at least. In practice small differences vendor extensions and other issues mean that moving from one vendor to another requires more work than just recompiling the application. At the minimum even if they follow the same standards vendors tend to introduce different bugs. But even if different vendors are not .

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.