tailieunhanh - Hướng dẫn học Microsoft SQL Server 2008 part 84

Tham khảo tài liệu 'hướng dẫn học microsoft sql server 2008 part 84', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | PartV Data Connectivity LINQ to XML example Create a new Visual Studio project. On the form add a text box and two buttons. Set the properties of the text box so that it is multi-line and has a vertical scroll bar. Behind button1 add the following code Document riders new Document new XDeclaration utf-8 yes new XComment Riders for the year 2008 new XElement Riders new XElement Rider new XAttribute Residence Florida new XElement Name Ricky Carmich ael new XElement Class 450 new XElement Brand Suzuki new XElement Sponsors new XElement Name Makita new XElement Rider new XAttribute Residence California new XElement Name Chad Reed new XElement Class 450 new XElement Brand Yamaha new XElement Sponsors new XElement Name ProTaper new XElement Rider new XAttribute Residence Mississippi new XElement Name Kevin Windham new XElement Class 450 new XElement Brand Honda new XElement Sponsors new XElement Name Factory Connection new XElement Rider new XAttribute Residence Florida new XElement Name James Stewart new XElement Class 450 new XElement Brand Kawasaki new XElement Sponsors new XElement Name Renthal 792 34 Be sure to add the appropriate reference to . Linq in your form prior to running the project using Before running the project take a look at the code. Notice that several of the classes were used to create and define the XML. For example the XDocument class was used to create an XML document. As well the XElement and XAttribute classes were used to define the attributes and elements of the XML document. Run the project and click button1 when the form displays. The text box on the form will display the following XML --Riders for the year 2008-- Riders Rider Residence Florida Name Ricky Carmichael Name Class 450 Class Brand Suzuki Brand Sponsors Name Makita Name Sponsors Rider Rider Residence California Name Chad Reed Name Class 450 Class Brand Yamaha Brand Sponsors Name ProTaper Name .

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.