Serge Knystautas wrote:

I would strongly suggest implementing something with segments instead
of DOM.  To see what I mean, take a look at
http://jerichohtml.sourceforge.net/.  It gives you roughly a DOM-style
to access and modify an HTML document.  But when you rebuild the
modified HTML, it assembles the content by merging the existing raw
stream content with whatever you've changed.
Thanks for the pointer... this is a weird coincidence. I recently wrote an HTML parsing library with a strikingly similar design! It's closed source (belongs to my employer) so I'm glad to see Jericho exists.

In comparison, building a stream from a DOM means you are converting
all your object representations back into streams.  This has the
downside of a) additional processing time b) possible changes to parts
you didn't modify.  This b) part is key to me since (as with HTML)
mime can have badly formatted parts that I would prefer we could just
ignore and leave alone if we didn't touch it.
Keep in mind that mime4j is a read-only parser, at least for now. Little or no thought has gone into how the API would work for read-write cases. But I strongly agree that if and when we get around to working on modifying messages, we should work very hard to avoid collateral damage.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to