NWChem has a nice python interface to access the runtime database(RTDB). If you really want an XML file, we have developed a CSX file that contains all information for the QM calculation. I have a code to write out the CSX file during an NWChem calculation. If you are interested, please send me a message in email bwang2453@gmail.com