Converting StyledDocument to plain HTML

So basically I have a JTextPane where people can press ctrl+i or a button and go into italics mode. I do this by using the classes StyleDocument, Style and StyleConstants. The way I do this can be seen in the addStyleToDocuments method in http://java.sun.com/docs/books/tutorial/uiswing/examples/components/TextSamplerDemoProject/src/components/TextSamplerDemo.java.

Anyways, so I have my styled JTextPane and now I want to convert it to html. How can I do this?

[475 byte] By [Enderx86a] at [2007-11-27 3:28:38]
# 1
Anyone?
Enderx86a at 2007-7-12 8:31:30 > top of Java-index,Desktop,Core GUI APIs...
# 2
use HTMLEditorKit write method and pass your document there.regards,Stas
StanislavLa at 2007-7-12 8:31:30 > top of Java-index,Desktop,Core GUI APIs...