Create Xml File

Hi, i’m trying to create an Xml file but i can’t find any references,

i’m using C# and so far i can manipulate an existing file, however, instead of using
“XmlDocument.Load()” i’d like to know if there’s an option like create or create new,so i can create a completely new xml file.


Do you really need to? That is, do you really need to create an XmlDocument? It’s a lot of overhead, just for the convenience of serializing at the end, and even then, not a big win IMHO. I just format strings and output them to a file normally (with appropriate tags and headers for proper XML of course).

You can fin full sources about Unity / XML in the blog :

  • Read
  • Write
  • Encrypting