I was looking over the Release Candidate code for the new BlogEngine.Net data store. I really like the idea of having a separate XML file for each extension as this helps with troubleshooting and management of extension data. But something bothered me... According to the blog entry on RTUR.NET it will be necessary to manually move out the extension data into a new XML file for each extension. The idea of moving over all of my existing extension data manually really gave me the creeps. So I went to work creating a method that will handle this tedious process.
The primary task of this code is to loop through each of the ManagedExtensions nodes and then create a new XML file that contains the contents of that node. The individual xml files should conform to the XML template specified on RTUR.NET's documentation.
I would suggest that you copy the extensions.xml file into a temporary folder that contains this console application. Then after you run the application you will see a separate XML file for each extension that was found in your extensions.xml file. Nothing will be done to the original XML file. I tested it out on my extensions.xml file and it appeared to work great. Also, I am including the source code for anyone who wants to modify it for their situation.
Here is what the output will look like:
If you have any problems feel free to drop me an email and I will try my best to help you out...
ConvertExtensions.zip (3.05 kb) | ConvertExtensions Source Code.zip (20.04 kb)