TAILIEUCHUNG - Building Oracle XML Applications phần 4

Với phiên bản mới nhất của các chi tiết kỹ thuật cho Java servlet và Enterprise Java Beans, Sun đã chuyển sang một định dạng XML thông tin cấu hình của nó. Ở đây chúng ta chỉ đơn giản nó là như thế nào để làm như vậy cho các chương trình của chúng ta bằng cách sử dụng XPath. | LINE I told him of your stealth unto this wood. LINE If we turn our new utility loose on our file to find all attributes in the file java XPathGrep @ XPathGrep will produce time Sun Apr 16 2 42am ET - . Markets Closed. Ticker ORCL Price Ticker GE Price Ticker MSFT Price Ticker IBM Price Ticker T Price Ticker LU Price Ticker CSCO Price Besides being simple to implement you ll find XPathGrep a handy sidekick in your daily work with XML. Using XPath for Reading Configuration Files With the latest releases of the specifications for Java servlets and Enterprise Java Beans Sun has moved to an all-XML format for its configuration information. Here we show how simple it is to do the same for our own programs using XPath. Let s say we have the following file which stores named database connections and the appropriate connection information for each -- -- connections connection name default username xmlbook username password xmlbook password dburl jdbc oracle thin @localhost 1521 ORCL dburl connection connection name demo username scott username password tiger password dburl jdbc oracle thin @ 1521 xml dburl connection connection name test username test username password test password dburl jdbc oracle thin @linuxbox 1721 ORCL dburl connection connections We can create a ConnectionFactory class that reads the file as a resource from the CLASSPATH and returns a JDBC connection for the connection name passed in. Example shows the implementation which leverages the following methods selectSingleNode To find the named connection in the XML-based configuration file valueOf On the connection element we find to quickly grab the values of the interesting child elements containing the JDBC connection information Example . Using an XML File for Configuration Information import . import .

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.