Chapter 11: Manipulating XML

 
Chapter 11 - Manipulating XML
bySimon Robinsonet al.
Wrox Press 2002
  

Overview

XML plays a significant role in the .NET Framework. Not only does the Framework allow you to make use of XML in your application; the Framework itself uses XML for configuration files and sourcecode documentation, as well as SOAP, Web Services, and ADO.NET just to name a few.

To accommodate this extensive use of XML, the .NET Framework includes the System.Xml namespace. This namespace is loaded with classes that we can use for the processing of XML, and we will be discussing many of these classes in this chapter.

We will look at how to use the XmlDocument class, which is the implementation of the DOM, as well as what .NET offers as a replacement for SAX (the XmlReader and XmlWriter classes). We will also discuss the class implementations of XPath and XSLT. We'll see how XML and ADO.NET work together and how easy it is to transform one to the other. We will also discuss how you can serialize your objects to XML and create an object from ( deserialize ) an XML document using classes in the System.Xml.Serialization namespace. More to the point, we will look at how you can incorporate XML into your C# applications.

You should note that the XML namespace allows you to get similiar results in a number of different ways. It is not possible to include all the variations in one chapter, so we will examine one possible way of doing something, and we will try and mention the other ways that the same task could be accomplished.

Since we don't have the space to teach you XML from scratch, we are assuming that you are already somewhat familiar with XML technology for this chapter. Therefore, you should know what elements, attributes, and nodes are, and you should also know what is meant by a well- formed document. You should also be familiar with SAX and DOM. If you to find out more about XML, Wrox's Beginning XML (ISBN 1-861003-41-2), and Professional XML (ISBN 1-861003-11-0) are great places to head for information.

Let's begin this chapter by taking a look at the current status of XML standards.

  


Professional C#. 2nd Edition
Performance Consulting: A Practical Guide for HR and Learning Professionals
ISBN: 1576754359
EAN: 2147483647
Year: 2002
Pages: 244

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