Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
thực hiện các thí nghiệm sau đây: 1. Trong Windows Explorer, tìm và chạy các ListHost.exe ứng dụng máy chủ. 2. Trong khi giao diện điều khiển ứng dụng đang chạy, chạy các ứng dụng cùng một máy chủ từ bên trong Visual Studio IDE.You có thể cần phải kích chuột phải | 470 Chapter 9 Working with XML Figure 9.11 shows the program after you click Run XPath Queries.When you click the button the program does a number of queries against the per-sonnel.xml file and writes the results into the listbox on the form. Figure 9.12 shows a portion of the XML contained in the personnel.xml file used to generate the queries. Figure 9.12 Generating Queries personnel.xml xml version 1.0 standalone yes Employees Employee EmployeeID 1 FirstName John FirstName MiddleInit M MiddleInit LastName Smith LastName Salaried true Salaried Wage 40000 Wage Active true Active Title Jr. Programmer Title Location Address 103 N.72nd Address City Seattle City State WA State Zip 98103 Zip Location Employee Employee EmployeeID 2 FirstName Joe FirstName MiddleInit R MiddleInit LastName Jones LastName Salaried false Salaried Wage 22.75 Wage Active true Active Title Graphic Artist Title Location Address 13222 S. 1st Avenue Address City Portland City Continued www.syngress.com Working with XML Chapter 9 471 Figure 9.12 Continued State OR State Zip 97206 Zip Location Employee Figure 9.13 contains the relevant portions of the source code for the XPath sample. Source code inserted by the Visual Studio.NET designer has been omitted. using System Figure 9.13 Relevant Portions of Source Code XPathForm.cs using System.Drawing using System.Collections using System.ComponentModel using System.Windows.Forms using System.Data using System.Xml using System.Xml.XPath using System.IO namespace XPath summary Summary description for Form1. summary public class Form1 System.Windows.Forms.Form summary Required designer variable. summary private System.ComponentModel.Container components null private System.Windows.Forms.TextBox textBox1 private System.Windows.Forms.Button button1 Continued www.syngress.com 472 Chapter 9 Working with XML Figure 9.13 Continued private string m_strOutput public Form1 InitializeComponent summary The main entry point for the application. summary STAThread .