> Hopefully you also support printing straight to an OutputStream (rather than
> having to go through toString() on each element). This could be a HUGE
> performance boost.
Yep, internally, during rendering, everything is first written to a
OutputStream or a PrintWriter (you have choices!)...rightnow, the toString()
method creates a ByteArrayOutputStream and a BufferedOutputStream is applied
to that (which is then passed to the rendering methods).
It is all very configurable, I promise. Also, remember that you will have
full source code so you will be able to do with it whatever you want. ;-) It
is a low level Construction Set for creating even cooler stuff. Adding basic
Elements takes about 5 minutes. ;-)
> Also, I imagine that you support iterating though the elements in a
> container (e.g. Document)?
The concept of a Document within this API is just a collection of Elements.
Rightnow, a Document has (Html,Head,Title,Body) elements and methods to
get/set them. One of my examples was incorrect with getTitle("The
title")...it will be setTitle("the title") when it is released, very late
night programming error on my part. To answer your question, you don't need
to "iterate" through the elements since a Document isn't really something
that you would want to iterate though...it is just a collection of things
that you already know the names of.
> Actually, come to think of it, it would also be nice if it conformed to the
> DOM spec. Does it?
You are not understanding the point of this API. When you see it the above
question won't apply. Essentially, you can create something that complies to
the DOM spec (or any tag spec for that matter) with this API.
-jon
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html