So I'm currently working on a program that allows users to created "posts" with styled text. Right now I'm using Java's DefaultStyledDocument, but I'm open to other options (preferably they implement StyledDocument, though). I originally posted something about directly serializing DefaultStyledDocuments here. However, it may be that there is a better way to store these documents. How can I do this?
Additionally, I want to be able to store these styles in a database (probably MySQL), would there be anything else I need to know when thinking about that? Can I directly export to XML?
Finally, a quick discussion on HTMLDocuments. I could use HTMLDocuments for this, however I've heard bad things about Java's HTML renderer, and I also want users to be able to easily edit the styled text. DefaultStyledDocument allows very easy editing use StyledEditorKit. So HTMLDocuments have their drawbacks, and unless alternative can be found, I'd prefer to stick with DefaultStyledDocuments.