TAILIEUCHUNG - Xml programming bible phần 7

Tôi đã chỉ cho bạn cây nút tài liệu XML giống như khi chúng được tạo ra bởi OpenXML trong một bảng cạnh, và tôi đã cung cấp một cái nhìn tổng quan về các tài liệu XML mà tôi đang sử dụng các ví dụ OpenXML. Bây giờ tôi có thể sử dụng các biểu thức OpenXML để chèn dữ liệu vào các bảng có liên quan. | Chapter 21 Building XML-Based Web Applications with JDBC 555 position textstring position return stringtofix Listing 21-11 shows what the Element XML output looks like for a quote in the application Listing 21-11 Custom XML Output Generated by the GetSingleQuoteElement Class xml version encoding UTF-8 resultset sql SELECT . Source Name FROM INNER JOIN ON INNER JOIN ON WHERE When the hurlyburlys done When the battles lost and won. sql metadata field name Quotation datatype char field name AuthorName datatype char field name Source Name datatype char metadata records record rownumber 1 Quotation When the hurlyburlys done When the battles lost and won. Quotation AuthorName Shakespeare William AuthorName SourceName Macbeth SourceName record records resultset Listing 21-12 is called when a user clicks on a quote and the Attribute XML Table Element Field Name Attribute option is chosen from the output format combo box. The Quote text is passed to the GetSingleQuoteAttribute class. This class generates another JDBC query to the SQL Server instance. The query returns a result set containing all of the columns in the quotations Table related to the selected quote. 556 Part IV Relational Data and XML Next the result set and the SQL query string are passed to the buildAttribute XML class which is used to build an XML document. The buildAttributeXML class is shown in Listing 21-13. Listing 21-12 The GetSingleQuoteAttribute Class public String GetSingleQuoteAttribute String PassedQuote String XMLDoc null String sql SELECT . Source Name FROM INNER JOIN ON INNER JOIN ON .

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.