I did something for this. I had an XML file to import, not from a web service and with no XLST and didn't want to write the struct definitions or the code by hand, so I wrote a program to look at the data in a sample XML file and write the code for me.
The xmltool.src file is not a general solution, but might be adaptable for your purpose or give you a starting point.
The cEfficientHireImport.pkg is the output of the xmltool.src so you can see what the generated code looks like from the example XML file EHXStandard.xml.