Contents at a Glance....5
Contents....6
About the Author....9
About the Technical Reviewer....10
Introduction....11
Chapter 1: Introduction to XML....12
What Is XML?....12
XPath....13
XSLT—Extensible Stylesheet Language....14
Wrapping Up....16
Chapter 2: Reading XML....17
Using XmlDocument....17
Searching with XPath....18
Search Using Attributes....21
Handling Namespaces....23
Using XPathDocument....25
Reading with XmlReader....25
Using LINQ to XML....28
Document vs. Document.Root: Getting to the Root Document....29
Searching for Attributes....29
Transforming Results....30
Using XPath with XDocument....31
Chapter 3: Modifying XML....32
Using XmlDocument....33
Modifying Attributes....33
Modifying Elements....34
Adding Attributes....35
Adding Elements....36
Merging Documents....39
Removing Attributes....41
Removing Elements....42
Saving Our Changes....43
LINQ to XML....44
Modifying Attributes....44
Modifying Elements....46
Adding Attributes....47
Adding Elements....48
Merging Documents....49
Removing Attributes....51
Removing Elements....52
Saving Our Changes....53
Chapter 4: Serialization....54
Creating a Model....54
Writing to File....54
Composition....60
Inheritance....64
SOAP....67
Deserializing....74
Chapter 5: Real Life Examples....76
RSS Feed Application....76
Weather Application....82
A Basic XML Serializer....86
Index....94
Learn XML and how to use and integrate it into your C# applications using this compact book. This guide helps you avoid the pitfalls of dealing with XML and C# since handling XML with C# and the .NET Platform can present its own set of challenges. XML is far from a dead technology, so it is important to learn how best to use it in your applications when the need arises.
Experienced Windows application programmers/developers using .NET and C# who may be new to using and applying XML.