• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Custom Output C# library

Duggan

Well-known member
So, I've been tempted to put together a custom BBCode output out for a while, but I was being lazy about learning how to parse the XML since XSD.exe chokes on it (it's got to do with nested elements, which it does not handle well). I decided to just roll my own and I finished it earlier today. It takes in an XML node and generates classes to store and read XML related to that item. The code is too crude for me to want to zip it up and post it, but you can find a copy at http://stackoverflow.com/questions/...-get-a-set-of-c-sharp-classes/8915129#8915129. Simple stuff, but it did the trick for me, or at least will once I figure out how to export a M&M character that uses all of the options. :)
 
So, it actually works rather nicely so far. I have a few fields like ChainedPowers and ChainedFeats which don't seem to get filled in even when I have a power with the Chained flaw, but I suspect that's an overflow from one of the other game systems. :) Next step is making it capable of generating the XSL file, which will require some refinements to do things like check for attribute types and whether a given element is unique in its location.
 
Back
Top