DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Joe Enos
Joe Enos

Posted on

XmlWriter in .NET

.NET gives you the XmlWriter class, which lets you build XML exactly how you want it. XML serialization requires a lot of upfront configuration, and often trial-and-error, before you figure out exactly which attributes you need and how to serialize your data perfectly. With XmlWriter, you get more control over the steps.

It's tedious, and can result in errors if you're not careful, but you can make it work.

Here's a video showing an example of how to build custom XML, along with the source code:

Here's the code for the sample on GitHub

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Just kidding, it's a personal preference. But you can change your theme, font, etc. in your settings.

The more you know. 🌈