December 2001
Beginner
976 pages
22h 4m
English
The examples shown so far in this chapter have saved the generated XML documents to a file using the Save method on the XmlDocument class. The Save method uses the filename passed as a String to the method for saving the XML content to a file.
In fact, there are several versions of the Save method that collectively use a String, System.IO.Stream, System.IO.TextWriter, or a System.Xml. XmlWriter to save the content of the XML document.
The Console.Out property is an instance of System.IO.TextWriter that can be used to output text to the console window. Therefore, you can display the content of an XML document by calling the object's save method and passing in the Console.Out object. For example:
doc.Save(Console.Out)
The ...
Read now
Unlock full access