Chapter 34Manipulating XML
WHAT’S IN THIS CHAPTER?
- XML standards
- XmlReader and XmlWriter
- XmlDocument
- XPathDocument
- XmlNavigator
- LINQ to XML
- Working with objects in the System.Xml.Linq namespace
- Querying XML documents using LINQ
- Using LINQ to SQL and LINQ to XML together
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
The wrox.com code downloads for this chapter are found at www.wrox.com/go/procsharp on the Download Code tab. The code for this chapter is divided into the following major examples:
- XmlReaderSample
- ConsoleApplication1
- XmlSample
- XmlSample01
XML
XML plays a significant role in the .NET Framework. Not only does the .NET Framework allow you to use XML in your application, the .NET Framework itself uses XML for configuration files and source code documentation, as do SOAP, web services, and ADO.NET, to name just a few.
To accommodate this extensive use of XML, the .NET Framework includes the System.Xml namespace. This namespace is loaded with classes that can be used for the processing of XML, and many of these classes are discussed in this chapter.
This chapter discusses how to use the XmlDocument class, which is the implementation of the Document Object Model (DOM), as well as what .NET offers as a replacement for SAX (the XmlReader and XmlWriter classes). It also discusses the class implementations of XPath and XSLT and demonstrates how XML and ADO.NET work together, as well as how easy it is to transform one to the other. You also learn how you can serialize your objects ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access