tailieunhanh - Web Server Programming phần 8

và một liên kết đến tập tin DTD sẽ phải được thiết lập trong file tài liệu XML. Các tập tin XML sẽ nhận được một liên kết DOCTYPE: và lựa chọn các mục tin tức từ một nguồn cấp dữ liệu tin tức. Khi một người dùng trở lại máy trạm của họ, họ sẽ tìm thấy một xem xét lại các tài liệu đã được chuẩn bị như một tài liệu hiển thị ngày. | DOM - the Document Object Model 427 The popular Java books for int i 0 i i Element bNode Element i NodeList temp STARS if 0 continue A book without a star rating Node starsNode 0 String starCode .getNodeValue float stars starCode if stars continue Node titleNode TITLE .item 0 .getNodeValue Node authorsNode AUTHORS .item 0 .getNodeValue If the XML document was to be checked for validity a file with a DTD would have to be created and a link to this DTD file would have to be set in the XML document file. The XML file would get a DOCTYPE link xml version encoding UTF-8 DOCTYPE LIST SYSTEM LIST BOOK rank 1 BOOK . LIST The file could contain the following -- DTD for Books -- ELEMENT LIST BOOK ELEMENT BOOK ISBN TITLE AUTHORS FORMAT STARS SHIPS LISTPRICE OURPRICE SAVE USEDPRiCe ATTLIST Book rank CdATA ReQUIRED ELEMENT ISBN PCDATA ATTLIST ISBN Code CDATA REQUIRED ELEMENT TITLE PCDATA ELEMENT AUTHORS PCDATA ELEMENT FORMAT PCDATA ELEMENT STARS PCDATA ELEMENT SHIPS PCDATa 428 XML ELEMENT LISTPRICE PCDATA ELEMENT OURPRICE PCDATA ELEMENT SAVE PCDATA ELEMENT USEDPRICE PCDATA Exercises Practical The servlet JSP XML exercises continue use of the Apache Tomcat engine as employed in the exercise for Chapters 7 and 8. Use the M3Gate phone emulator from http you can obtain alternative emulators from companies such as Nokia see also the explorations exercise below . The XML parser exercises can be done with the xerces parser downloaded from http xerces2-j . Copy into the directory where you are developing an application and then specify a classpath like classpath . . . 1 Implement a third version of the JSPs needed in

crossorigin="anonymous">
Đã 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.