I want to run a c++ program to process a lot of data from different xml files and output results. I run the program once per file and potentially have around 50 different files.
The trouble is each xml file has different naming convention for the nodes, for example:
<entry> <id><![CDATA]></id> <description><![CDATA[Dolce 27 Speed]]></description> </entry>
<item> <uuiid><![CDATA]></uuid> <content><![CDATA[Dolce 27 Speed]]></content> </item>
What is the appropriate way to define these mappings, so when I run the program the software knows what data is in what tags, so I can store the id, description etc together no matter what the input tags are.
Ideas I have so far are:
A) Start the program with flags (in the real program there will be 10 mappings so could get messy), I.e ./main --id uuid --description content
B) Put them in a map and refer to that at start up (any suggestions on how to do the map would be great), I.e ./main --map example1
C) None of the above