TAILIEUCHUNG - Dùng DOM để display XML thành nhiều tầng trong TreeView

Dùng DOM để display XML thành nhiều tầng trong TreeView I nternet Explorer cho ta Document Object Model (DOM) ActiveX gọi là mà ta có thể dùng trong VB6. Ðầu tiên là Microsoft XML, version , tiếp theo đó là Microsoft XML, và mới nhất là Microsoft XML, . | Dùng DOM để display XML thành nhiều tầng trong TreeView I nternet Explorer cho ta Document Object Model DOM ActiveX gọi là mà ta có thể dùng trong VB6. Đầu tiên là Microsoft XML version tiếp theo đó là Microsoft XML và mới nhất là Microsoft XML . Cả ba DLL nầy đều có trong danh sách các References mà ta có thể include khi dùng IDE Menu command Project References. Khi ta Load một XML file vào DOM nó tự động parse XML data để build một Tree gồm nhiều nodes với thứ bậc cha con bên trong. Dựa theo đó ta có thể display cái DOM Tree ấy trong một TreeView để có thể hình dung được cấu trúc của XML data. Trong thí dụ dưới đây ta Load một XML file tên vào DOM. XML file nầy còn có một Schema file tên . Khi DOM load XML file ta có thể dặn nó kiểm validate xem XML data có theo đúng tiêu chuẩn đòi hỏi trong Schema file. Content của như sau lưu ý hàng thứ 7 nhắc đến mà DOM sẽ dùng để validate data trong XML file xml version xml stylesheet type text xsl href -- Copyright 2000 Wattle Software http -- library xmlns x-schema -- declare the Schema which defines this document -- name Northmead Local Library name book hardback yes availableforloan no title C Programming for Beginners title author first-name Claude first-name last-name Schwartz last-name author callno C callno online_url http library online_books online_url book journal series XML Users Journal title XML Users Journal August 1999 title date 1999-08-01 date callno C callno journal video title Titanic title director name James Cameron name director callno T callno video book title The C Programming Language title author first-name Brian first-name last-name Kernighan last-name author author first-name Dennis first-name last-name Ritchie last-name author callno C2 callno online_url http library online_books online_url book library .

Đã 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.