First some background, I am writing an application in C# that will allow a user to easily specify a series of programs, commands, or websites with arguments and window positions, then launch them with a single click. I'm trying to decide if it would be better to use XML or JSON to encode the user files.
Here's my preliminary designs for the data structures :
XML
<AutoLauncher>
<Program>
<Location>C:\example.exe</Location>
<Arguments>
<Argument>
<Key>a</Key>
<Value>true</Value>
</Argument>
</Arguments>
<Position>
<Monitor>1</Monitor>
<X>0</X>
<Y>0</Y>
</Position>
</Program>
<Cmd>
<Command>example</Command>
<Arguments>...</Arguments>
<Position>...</Position>
</Cmd>
<Website>
<Url>www.example.com</Url>
<Browser>Default</Browser>
<Arguments>...</Arguments>
<Position>...</Position>
</Website>
</AutoLauncher>
JSON
{
Programs: [
{ Location: "C:\example.exe",
Arguments: [
{Key: "a", Value: true}
],
Position: {
Monitor: 1,
X: 0,
Y: 0
}
}
],
Commands:[
{ Command: "example",
Arguments:[...],
Position: {...}
],
Websites: [
{ Url: "www.example.com",
Browser: "default",
Arguments: [...],
Position: {...}
]
}
Note: I used ... in the arguments and position of the commands and websites as the structure would be exactly like the programs structure.
Which data structure would be best (Or is there something else that would be better)?