.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: