I want to add variables to my file so it can be read by another programme. Each variable name needs to be unique.
I've tried searching lots on Stack Overflow but none of the answers solve my problem in one go and I'm too inexperienced to glue them all together. The solution can be with an XML parser or just with .txt files. Languages I would prefer in order: Python, Java, C# or Scala. It doesn't need to be a robust/long term solution as it won't be relied upon.
E.g.
<Tag1>
<USA></USA>
<UK></UK>
</Tag1>
<Tag2>
<FRA></FRA>
<USA></USA>
</Tag2>
I want to edit the above file into:
<Tag1>
<USA>var1a</USA>
<UK>var1b</UK>
<FRA>var1c</FRA>
</Tag1>
<Tag2>
<USA>var2a</USA>
<UK>var2b</UK>
<FRA>var2c</FRA>
</Tag2>
Thanks