Introduction


Extensible Markup Language (XML) is a simple, portable, and flexible way to represent data in a structured format. XML is used in a myriad of ways, from acting as the foundation of web-based messaging protocols such as SOAP, to being one of the more popular ways to store configuration data (such as the web.config, machine.config, or security.config files in the .NET Framework). Microsoft recognized the usefulness of XML to developers and has done a nice job of giving you choices concerning the trade-offs involved. Sometimes you want to simply run though an XML document looking for a value in a read-only cursorlike fashion, and other times you need to be able to randomly access various pieces of the document. Microsoft provides classes like XmlReader and XmlWriter for lighter access and XmlDocument for full Document Object Model (DOM) processing support. In the 1.x versions of the Framework, the XmlTextReader, XmlTextWriter, and XmlValidatingReader classes were provided as concrete instances to be used. Microsoft is now recommending using the factory methods on the XmlReader and XmlWriter classes, in conjunction with the XmlReaderSettings and XmlWriterSettings classes to work with XML.

It is likely that you will be dealing with XML in .NET to one degree or another. So this chapter explores some of the uses for XML and XML-based technologies such as XPath and XSLT. It also explores topics such as XML validation and transformation of XML to HTML.



C# Cookbook
Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More
ISBN: 0596003943
EAN: 2147483647
Year: 2004
Pages: 424

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net