TAILIEUCHUNG - Learning XML phần 4

Chúng ta hãy nhìn vào trường hợp đòi hỏi phải có thẻ kết thúc mỗi phần tử chứa. Trong HTML, thẻ kết thúc đôi khi có thể được bỏ qua, để lại nó lên đến trình duyệt để quyết định một phần tử kết thúc: Các anh chị em một thứ hai hoặc một đứa trẻ đầu tiên? Bạn không thể nói bởi vì bạn không biết bất cứ điều gì | Learning XML psibl ing psibling behaves like fsibling but it searches among the siblings that come before the location source in its parent container older siblings . The direction is also reversed. The path is shown in Figure . Figure The path of psibling positive negative page 79 Learning XML ancestor The term ancestor works like a genealogist in that it traces the ancestry of a node all the way up to root . With a positive first argument ancestor works upward starting at the location source s parent and ending up at root . With a negative argument it starts at root and ends at the location source s parent. Figure illustrates the order in which this term follows nodes. Figure The path of ancestor For example to find the department for any employee in the chart you can use the term ancestor i department . To find that employee s boss if one exists use the term ancestor 1 employee . Note that if the starting point is the element for a vice president this location term will match zero nodes and fail. There are multiple ways to reach the same location. In order to locate the employee element for Mary A. any of the locators in this example will do root .child 1 personnel .child 1 .child 1 .child 3 .child 1 .child 3 . child 2 root .child 1 personnel . 1 . 1 . 3 . 1 . 3 . 2 root .child 1 personnel .follow ng 1 id iiiarketing . preceding 2 empl oyee id sales .dếscendant id sales .descendant -2 ernpioyee page 80 Learning XML Strings The relative terms discussed so far work only on complete nodes. Even with the text keyword the locator matches all the text between adjacent nodes. This is a problem if we want to find a smaller subset such as a word or a larger group of text with inline elements interspersed such as a complete paragraph. The string term helps in these situations. string takes between two and four arguments. They are slightly analogous to the arguments of the previous relative location terms we ve seen. The first argument

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.