Hello Yali,
Are you looking for a one-time process (or something done "once in a while"), or a fully automated solution?
I think you will have more options if you are willing to have a manual step in the process.
For example, if you are able to extract your data in CSV (using either the XML ID or the NAACCR numbers as column headers), then there are software you can use to convert CSV to XML (File*Pro is one of them, there might be others).
If you are looking for a fully automated solution, I recommend you look into existing libraries to help you with that. I am not personally familiar with it, but I know that at some point CDC released a DLL to read/write XML. It was part of their XML Exchange Plus software (https://www.cdc.gov/cancer/npcr/tools/registryplus/xml-exchange-plus.htm). I took a quick look and I don't see a reference to a standalone DLL anymore, but it might be worth for you to contact them and ask about it. It might still be available somewhere else.
You can also write the code yourself to convert CSV to XML, but that will certainly take more time than using an existing library!
------------------------------
Fabian Depry
Information Management Services, Inc.
------------------------------