>What is the difference between using JAXP Transformer and XML serializer to serialize an XML DOM.
Theoretically, or practically? Theoretical: I believe the Transformer support is the TrAX APIs. If so, it isn't just serializers; they're a general transformation mechanism which can be used to read documents from XML, write them to XML, convert between DOM and SAX or vice versa... and can also be used to run things like XSLT stylesheets. Xalan can be invoked via TrAX, for example. The default should be a simple copy-document-content (the "identity transformation")... but depending on the implementation that may involve more processing of the document; the output will be semantically correct but may be syntactically different. A DOM serializer, on the other hand, is more specialized, and may or may not more accurately capture semantically-irrelevant details recorded in the DOM. Practical: Xalan's current implementation of the Default Identity Transformation has a few minor warts, documented in Xalan's Bugzilla entries. Also, a dedicated DOM serializer may (or may not) be more efficient than sending data through the more general TrAX data paths. Also, the Xalan code may (or may not) currently do a better job of serializing to HTML, if that's your goal. Basically, Transformation is more powerful, but may be more costly and may require more active involvement to get the output you want. "With power comes responsibilty to control that power." ______________________________________ Joe Kesselman / IBM Research --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
