Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I create a new extension for an xml file?

I'm working with a data model stored in XML files. I want to create some metadata for the model and store it alongside, but would like to be able to distinguish between the two. The data model is imported into some software from time to time and we don't want it to try to import the meta data files.
To get round this, I've been thinking of creating a new extension for the metadata xml files (say .mdml). Is this good practice?

like image 794
macleojw Avatar asked Dec 29 '22 15:12

macleojw


1 Answers

Yes. Create a file with a different extension.

The fact that your model uses XML is an implementation detail. The fact that most other file formats use a proprietary binary format doesn't mean that they all have to be called filename.bin, so why should all XML files need to be called filename.xml?

Yeah, sure, it might be nice to double-click the file and have it loaded into an XML-aware text editor. But surely it's nicer to be able to double-click on (for example) a .csproj file (which is XML) and have it load into Visual Studio?

like image 64
Roger Lipscombe Avatar answered Jan 21 '23 07:01

Roger Lipscombe