eu.cdevreeze.yaidom

print

package print

Support for "printing" yaidom Documents and Elems. This package offers the DocumentPrinter trait, as well as several implementations. Most of those implementations use the convert package to convert yaidom Documents to JAXP artifacts, and all use JAXP (DOM, SAX or StAX).

Having these different fully configurable JAXP-based implementations shows that yaidom is pessimistic about the transparency of parsing and printing XML. It also shows that yaidom is optimistic about the available (heap) memory and processing power, because of the 2 separated steps of JAXP parsing/printing and (in-memory) convert conversions. Using JAXP means that escaping of characters is something that JAXP deals with, and that's definitely better than trying to do it yourself.

One DocumentPrinter implementation does not use any convert conversion. That is DocumentPrinterUsingSax. It is likely the fastest of the DocumentPrinter implementations, as well as the one using the least memory.

The preferred DocumentPrinter for XML (not HTML) printing is DocumentPrinterUsingDomLS, if memory usage is not an issue. This DocumentPrinter implementation is best integrated with DOM, and is highly configurable, although DOM LS configuration is somewhat involved.

This package depends on the yaidom and convert packages, and not the other way around.

Visibility
  1. Public
  2. All

Type Members

  1. trait DocumentPrinter extends AnyRef

    Document printer (to the XML as a String or byte array).

  2. final class DocumentPrinterUsingDom extends DocumentPrinter

    DOM-based Document printer.

  3. final class DocumentPrinterUsingDomLS extends DocumentPrinter

    DOM-LS-based Document printer.

  4. final class DocumentPrinterUsingSax extends DocumentPrinter

    SAX-based Document printer.

  5. sealed class DocumentPrinterUsingStax extends DocumentPrinter

    StAX-based Document printer.

Value Members

  1. object DocumentPrinterUsingDom extends AnyRef

  2. object DocumentPrinterUsingDomLS extends AnyRef

  3. object DocumentPrinterUsingSax extends AnyRef

  4. object DocumentPrinterUsingStax extends AnyRef