I have to get an email’s content (HTML format) and save it to a string which then should be parsed to get the required details and to prepare an XML output.
I am using JAMES and i want it to be done in Java. How can I dump the HTML page into a string? Do you think I won’t get any problem with the double inverted commas, spaces, backward slash while parsing?
Now i am testing mailserver on my localsystem.
I sent a mail from user1@localhost to user2@localhost in format HTML
At the other end i want to convert the parse HTML page to create an XML document with the desired values ..
Can you try with that example. Dumps html page and writes that data into data.html file.
From bellow code you can append result to StringBuffer and replace the html special chars.
}