I have to write a import utility which will import some data held in an xml file. I imagine that I will create a simple DTO object which is the representation of the import data and then write all my code so that it does the import based on this object.
The XML file will be the definition of the transfer format, so I expect that 3rd parties will produce files in the format to be able to import data into the application. The format may also be expanded in the future, to allow import of more types of data.
What I would like is a simply way of getting my object populated with all the import data to process from the XML file.
I was thinking that I could just deserialise the xml file, but am concerned that there might be issues for 3rd parties creating the files without having the DTO object to serialise in the first place. Is this likely to be a problem? What are the other alternatives, preferably which don't involve reading the xml file manually, but obviously that will be the fall back solution.