364 CHAPTER 12 CASE STUDY: USING .NET (Web server setup)

364 CHAPTER 12 CASE STUDY: USING .NET FOR AN XML APPLICATION In this case, the code uses an XmlTextWriter object to create the XML stream and generate the content for the news feed. I didn t cover this object in Chapter 11, so Table 12-2 provides a summary of the most important methods. Table 12-2. The Most Important Methods of the XmlTextWriter Class Method Explanation WriteStartDocument() Writes the XML declaration, using version 1.0 WriteEndDocument() Closes open elements or attributes WriteComment() Writes a comment WriteProcessingInstruction() Writes a processing instruction WriteDocType() Writes the DOCTYPE declaration WriteStartElement() Writes a starting tag WriteEndElement() Closes the current tag WriteElementString() Writes an element including text WriteStartAttribute() Writes the start of an attribute WriteEndAttribute() Writes the end of an attribute WriteAttributes() Writes an attribute Flush() Flushes the buffer to the stream Close() Closes the XML stream You ll see many of these methods used in the rss.aspx page, which follows: <%@ Page Language="VB" %> <%@ import Namespace="System.IO" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Xml" %>