mcts 70-562 Microsoft .NET Framework 3.5, ASP.NET Application Development phần 5

Bạn có hai lựa chọn chính để đảm bảo cho các dịch vụ Web XML bằng văn bản. Asmx tập tin và lưu trữ bởi . Đầu tiên là sử dụng một trong các phương pháp bảo mật tiêu chuẩn để xác thực và ủy quyền cho người sử dụng. | write to xml file MapPath display file XML xml version standalone yes CompanyList company Id 63cd2a1e-c578-4f21-a826-c5dfb50258b0 CompanyName Northwind Traders employee Id a2e7bbba-20ba-4b73-86b3-2d0cca4f1bbb coId 63cd2a1e-c578-4f21-a826-c5dfb50258b0 LastName JoeLast FirstName JoeFirst Salary 40 employee Id 5cf475e8-1d97-4784-b72f-84bfbf4a8e14 coId 63cd2a1e-c578-4f21-a826-c5dfb50258b0 LastName MaryLast FirstName MaryFirst Salary 70 employee Id 55ff1a2b-8956-4ded-99a4-68610134b774 coId 63cd2a1e-c578-4f21-a826-c5dfb50258b0 LastName SamLast FirstName SamFirst Salary 12 company company Id 0adcf278-ccd3-4c3d-a78a-27aa35dc2756 CompanyName Contoso employee Id bc431c32-5397-47b6-9a16-0667be455f02 coId 0adcf278-ccd3-4c3d-a78a-27aa35dc2756 LastName SueLast FirstName SueFirst Salary 20 employee Id 5822bf9f-49c1-42dd-95e0-5bb728c5ac60 coId 0adcf278-ccd3-4c3d-a78a-27aa35dc2756 LastName TomLast FirstName TomFirst Salary 68 employee Id 1b2334a4-e339-4255-b826-c0453fda7e61 coId 0adcf278-ccd3-4c3d-a78a-27aa35dc2756 LastName MikeLast FirstName MikeFirst Salary company CompanyList In the example the XML file is written but the XML file contains no information that describes the data types of the data. When not specified the default data type for all data is string. If the XML file is read into a new DataSet all data including DateTime data and numeric data is loaded as string data. Use the enumeration value when saving because it stores the data type information with the XML file. The resulting XML file is substantially larger. Instead of embedding the schema in the XML file you can create a separate XSD file to load before loading the data. You can use the Lesson 1 Using the Disconnected Classes CHAPTER 7 403 DataSet object s WriteXmlSchema method to extract the XML schema definition to a separate file as shown here VB write to xsd file .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
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.