james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Cheng <c...@joecheng.com>
Subject Re: Mime4J
Date Mon, 06 Jun 2005 03:47:40 GMT
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message