TAILIEUCHUNG - Pro XML Development with Java Technology 2006 phần 4

Một bộ kiểm ngữ SAX không tạo ra bất kỳ chủ thể nào, nó chỉ đơn giản gửi các sự kiện đến yêu cầu của bạn. Bạn muốn tạo ra các chủ thể dựa trên những sự kiện đó hay không là tùy ý bạn. Bộ kiểm ngữ SAX bắt đầu gửi các sự kiện cho bạn ngay khi bắt đầu kiểm ngữ. Mã của bạn sẽ nhận được một sự kiện khi bộ kiểm ngữ tìm thấy nơi bắt đầu văn bản, một phần tử hay một đoạn từ ngữ, Yêu cầu của bạn sẽ có kết quả ngay. | 92 CHAPTER 4 ADDRESSING WITH XPATH For all other specified axes it refers to an element node that is not in any namespace including not in the default namespace . For example in Figure 4-2 following-sibling article selects the third article node in document order. A name-based node with a namespace prefix refers to the following An empty set if the specified axis is a namespace axis. For example in Figure 4-2 if you assume the context node is the catalog element then namespace xmlns journal is an empty set. It refers to an attribute node in the associated namespace if the specified axis is an attribute axis. For example in Listing 4-1 attribute journal level selects the level attribute of the first article node in document order. For all other specified axes it refers to an element node in the associated namespace. For example in Figure 4-2 the preceding journal journal element selects the first journal element in document order. A node name test with refers to an unrestricted wildcard for element nodes. For example in Figure 4-2 child selects a node set containing all child axis elements. This implies that child and child node do not have the same semantics because the former is restricted to the child axis element nodes and the later selects the child axis nodes of any node type. A node test with the prefix name refers to a namespace-restricted wildcard for element nodes. For example catalog child journal evaluates to a node set containing all elements that are children of the catalog element and that belong to the journal namespace which is just the first journal element within the document in document order. Predicates The last piece in a location path step is zero or more optional predicates. The following are the two keys to understanding predicates Predicates are filters on a node set. Predicates are XPath expressions that are evaluated and mapped to a Boolean value through the use of a core XPath boolean function as described here A number value is mapped .

TÀI LIỆU MỚI ĐĂNG
Đã 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.