Thứ Ba, 5 tháng 8, 2014

Show all tags of a xml document using TreeWalker

Create an application demonstrating traversal of a DOM tree using the
TreeWalker interface.
Create an XML document containing the employee details of an organization.
Then create an application, which uses the DOM parser to parse the XML
document into a DOM tree and traverses through it.
The application should implement the TreeWalker interface to traverse through
all the nodes present in the DOM tree and print the value of the nodes.




- Chạy :

Tổng Kết :
- TreeWalker và Nodeiterator đều load dữ liệu nhưng mỗi cái lại có ưu điểm riêng.
- TreeWalker dùng phức tạp hơn so với Nodeiterator do TreeWalker thể hiện quan hệ thứ bậc trong xml còn NodeIterator thể hiện thứ tự tài liệu.
- Phân biệt được TreeWalker và Nodeiterator .
- Hiểu về TreeWalker.

Không có nhận xét nào:

Đăng nhận xét