Chapter 9. Using XML: Creating a Guest Book Application

In This Chapter:

  • .NET XML Architecture

  • XmlTextReader

  • XmlTextWriter

  • XslTransform

  • Writing a Guest Book Application

This chapter covers XML and how to effectively use XML in .NET applications. The first thing you need to know is why you should use XML. After all, Web applications have been written now for years, and no one has had to worry about XML. One of the main reasons you need to consider using XML is that Web applications have now gotten much more complicated, and XML represents data in a new way. Because XML is so good at representing data, writing large enterprise Web applications is a lot easier.

XML adds type and structure to information with the Extensible Schema Definition (XSD) mechanism. This information in the past may have been some sort of HTML data, or some sort of query result from a database. The point is, though, that information can be stored anywhere on the Internet, and XML plus a data description in XSD adds structure to this information. XML also enables data from multiple sources to be aggregated into a single unit of information. This aggregated information will contain XML-specific structure information. For instance, a C++ data structure can be represented as the following XML snippet:

 C++ Data struct POINT {     int x;     int y; } spot = { 20, 40 }; XML Data <spot type='POINT'>     <x>20</x>     <y>40</y> </spot> 

XML is a set of specifications from the World Wide Web Consortium (W3C); XPath, XSL, XSD, and XML are the family of specifications that are of most interest. These specifications are publicly available at Anyone can contribute and comment and implement these standards. Microsoft followed these standards as it developed the .NET XML classes.

ASP. NET Solutions - 24 Case Studies. Best Practices for Developers
ASP. NET Solutions - 24 Case Studies. Best Practices for Developers
ISBN: 321159659
Year: 2003
Pages: 175 © 2008-2017.
If you may any questions please contact us: