Đang chuẩn bị liên kết để tải về tài liệu:
Pro XML Development with Java Technology 2006 phần 7

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Java API cho Kiểm ngữ XML Mặc dù DOM, SAX, và JDOM đều cung cấp những phân giới tiêu chuẩn cho hầu hết các nhiệm vụ thông thường, nhưng vẫn có một số thứ chúng đều chưa đạt tới. Ví dụ, quy trình tạo ra một chủ thể DOMParser (Kiểm ngữ DOM) trong lập trình Java khác xa so với một bộ kiểm ngữ DOM. Để điều chỉnh vấn đề này, Sun đã tạo ra JAXP, Java API cho Kiểm ngữ XML. API này cung cấp các mặt phân giới chung cho việc xử lý văn bản XML khi sử dụng. | 210 CHAPTER 7 BINDING WITH XMLBEANS try Create a cursor CatalogDocument catalogDocument CatalogDocument.Factory .parse xmlFile XmlCursor cursor catalogDocument.newCursor Move cursor to start of root Element cursor.toFirstContentToken Move cursor to first child element cursor.toFirstChild Add an Element cursor.beginElement journal Add an attribute cursor.insertAttributeWithValue publisher IBM developerWorks cursor.dispose Output modified document System.out.println catalogDocument.toString catch IOException e catch XmlException e Method to navigate an XML document public void navigateXMLDocument File xmlFile try Create a CatalogDocument object and create a cursor CatalogDocument catalogDocument CatalogDocument.Factory .parse xmlFile XmlCursor cursor catalogDocument.newCursor Move cursor to start of root Element cursor.toFirstContentToken Move cursor to start of first child Element cursor.toFirstChild Move cursor to start of article element cursor.toFirstChild Move cursor to start of title element cursor.toFirstChild System.out.println cursor.getTextValue Dispose cursor cursor.dispose catch IOException e catch XmlException e CHAPTER 7 BINDING WITH XMLBEANS 211 public static void main String args XMLBeansCursor xmlBeansCursor new XMLBeansCursor File xmlFile new File catalog.xml xmlBeansCursor.navigateXMLDocument xmlFile xmlBeansCursor.addElement xmlFile xmlBeansCursor.selectWithXPath xmlFile xmlBeansCursor.selectWithXQuery xmlFile Summary XMLBeans is an XML-to-Java binding and runtime framework that is similar to JAXB. You can use the binding framework to bind an XML Schema to Java types. XMLBeans offers complete support for all XML Schema constructs. You can use a binding configuration file to customize XML Schema to Java type bindings. You can use the runtime framework to unmarshal and marshal an XML document to and from Java objects that are instances of bound Java types. In addition to marshaling and unmarshaling an XML document XMLBeans offers low-level .

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.