I want to write this mainly because sometimes it is difficult to generate corresponding format files based on the tables in the database. The difference is actually the database part, the external code generator can be customized with less space, while also deepening the XML application.
Here, a lot of ideas I refer to Yuan Yongfu Yuan http://www.cnblogs.com/xdesigner/archive/2008/05/15/1198398.html
Let's talk about my ideas first.
1. Analyze the table and field information of the database. (Mainly sqldmo)
2. Select the corresponding table to generate the corresponding XML file.
3. Generate a file in the corresponding format based on the corresponding XLST file.
In general, there is no problem. The idea is also relatively simple.
Follow these steps.
Select a database.
Then obtain the information of the corresponding database.
Select the relevant table. If userinfo is selected above, the corresponding XML file is generated. The format is as follows.
The XLST document used for testing is as follows,
The final file is as follows.
Almost the entire process is as above. The most important thing to do is to compile the XLST file. Now I only write CSHARP and HTML processing, and I haven't done anything about it yet.
You only need to put the prepared XLST document into the corresponding document, and select several corresponding XLST documents on the main interface, then several corresponding documents will be generated for you.
PS: I can use WPF to make such an ugly interface. I don't know what Ms thinks ....