Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Programming Visual Basic 2008 phần 6
Đang chuẩn bị liên kết để tải về tài liệu:
Programming Visual Basic 2008 phần 6
Thanh Huyền
99
79
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Và sử dụng các loại của nó trong mã của bạn.) Trước khi sử dụng chúng trong mã, chúng ta cần phải tạo ra tài liệu tham khảo cho họ. Điều này được thực hiện thông qua các cửa sổ tài sản dự án, trên tab Tài liệu tham khảo. Bạn sẽ thấy một danh sách của những hội đồng đã được tham chiếu bởi ứng dụng (xem hình 10-9). | Dim attrData As XmlAttribute attrData products.CreateAttribute ID attrData.Value 652 supplier.SetAttributeNode attrData So this is nice and all but what if you already have some XML in a file and you just want to load it into an XmlDocument object Simply use the XmlDocument object s Load method. Dim products As XmlDocument products New XmlDocument products.Load c products.xml For those instances where you just want to read or write some XML from or to a file and you don t care much about manipulating it in memory the XmlTextReader and XmlTextWriter classes let you quickly read and write XML data via a text stream. But if you are going to do things with the XML data in your program the Load and Save methods of the XmlDocument object are a better choice. Finding Needles and Haystacks In our sample data all of the products appear in supplier groups. If we just want a list of products regardless of supplier we ask the XmlDocument object to supply that data via an XmlNodeList object. Dim justProducts As XmlNodeList Dim oneProduct As XmlNode ----First get the list. justProducts products.GetElementsByTagName product ---- Then do something with them. For Each oneProduct In justProducts ----- Put interesting code here. Next oneProduct MsgBox Processed justProducts.Count.ToString _ product s . For a more complex selection of nodes within the document the System.Xml.XPath namespace implements the XPath searching language which gives you increased flexibility in locating items. The Visual Studio documentation describes the methods and searching syntax used with these classes. Schema Verification An XmlDocument object can hold any type of random yet valid XML content but you can also verify the document against an XSD schema. If your XML document refers to an XSD schema includes a DTD or uses XDR XML Data Reduced schemas similar to XSD an XmlReader when configured with the appropriate XmlReaderSettings will properly compare your XML data against the defined rules and throw an .
TÀI LIỆU LIÊN QUAN
Programming Visual Basic 2008
Programming Visual Basic 2008 phần 1
Programming Visual Basic 2008 phần 2
Programming Visual Basic 2008 phần 3
Programming Visual Basic 2008 phần 4
Programming Visual Basic 2008 phần 5
Programming Visual Basic 2008 phần 6
Programming Visual Basic 2008 phần 7
Programming Visual Basic 2008 phần 8
Programming Visual Basic 2008 phần 9
crossorigin="anonymous">
Đã 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.