From the course: .NET Essentials: LINQ for XML
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Use the DumpFormatted extension method - .NET Tutorial
From the course: .NET Essentials: LINQ for XML
Use the DumpFormatted extension method
- In this final chapter, we will explore how to create and modify the XML structure of an XML file. For example, we will build the XML tree, add and remove nodes, determine how to move nodes to another part of the tree, and how to rename elements and attributes. Before showing you how to modify the structure of the XML. I thought I'd point out one additional feature that's available in the link Pad, that we haven't used yet in this course. It's another method It's another method for outputting the information called dump formatted. And it writes the output to a separate window, turns on outlining. And this is an extension method for X element. So what I'm doing here is this is a X element. So what I'm doing here is this is a X element. So I'm calling dump formatted here and I'm doing the same thing as I've moved down through the element tree. So we'll run the query. And then what I want you to see is the results…
Contents
-
-
-
-
-
-
(Locked)
Use the DumpFormatted extension method1m 32s
-
(Locked)
XDocument compared to XElement2m 40s
-
(Locked)
Create XML structure3m 18s
-
(Locked)
Rename elements and attributes1m 49s
-
(Locked)
Replace elements and attributes1m 30s
-
(Locked)
Remove element1m 26s
-
(Locked)
Add parent element and move elements2m 14s
-
(Locked)
Challenge: Move attributes and elements1m 9s
-
(Locked)
Solution: Move attributes and elements2m 31s
-
(Locked)
-