I need to convert HTML to plain text. My only requirement of formatting is to retain new lines in the plain text. New lines should be displayed not only in the case of <
<
You can use XSLT for this purpose. Take a look at this link which addresses a similar problem.
Hope it is helpful.