> Yes, I agree with Andy. a > public void serialize(Node node) throws IOException; > method may be all we need to support all the Node objects including > Document, Element, DocumentFragment, etc.
Except that I don't see it supporting anything except Document, Element and DocumentFragment. IF you look at the implementation, it can certainly support processing instruction, text and attribute node. But I don't see that being supported in other serializers that easily. > Look at the way we implement the dom.DOMWriter > public void print(Node node) method. My point. Look at the way I implemented BaseMarkupSerializer. No difference. But can you make it work for a PDF serializer? An SVG to something serializer? A WBXML serializer? > >But I think that we could do without it altogether and just > >make it possible to register new methods with the serializer > >factory. But I'll get to that in a minute. > > I will vote for doing without it if we can. Yes we can. > I think that this idea has a lot of potential maybe using the TreeWalker > method and allowing a way to register a filter then the > serializer could be customized to output user selected nodes. > A user can select and serialize a view of the DOM this way. +1 > I agree, I think that the SerializerFactory could allow dynamic > registration of OutputMethods and/or Serializers. No problem getting that done :-) > Yes, we need to figure this out. I think the safest way would be > to move this package to the org.apache.xerces namespace > Andy, by the way this package is in the org.Apache.xml not the > org.xml ( Am i missing something here? ). The original package is actually in the org.apache namespace. This API is proposal for a cross-parser API that we hope other parsers will support as well, hence the different namespace. > Arghh!! excuse me!! SVG getting serialized to a JPEG image is quite > an interesting idea!. What is next, smil files to native realaudio > files? Yes. Damn serious, no smiley. arkin > >Objects, though. Perhaps a better example would be an XML > >serializer that outputs to WBXML. > > > > Yes, this is a good idea and I would like so see it implemented. WBXML > (binary XML) has a lot of potential specially for embedded devices, cellular > phone applications, PDA, etc. > > Jeffrey Rodriguez > XML Development > IBM Cupertino > > ______________________________________________________ > Get Your Private, Free Email at http://www.hotmail.com -- ---------------------------------------------------------------------- Assaf Arkin www.exoffice.com CTO, Exoffice Technologies, Inc. www.exolab.org