final
class
DocumentPrinterUsingDomLS extends DocumentPrinter
Instance Constructors
-
new
DocumentPrinterUsingDomLS(docBuilderFactory: DocumentBuilderFactory, docBuilderCreator: (DocumentBuilderFactory) ⇒ DocumentBuilder, domImplementation: DOMImplementationLS, serializerCreator: (DOMImplementationLS) ⇒ LSSerializer)
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
val
docBuilderCreator: (DocumentBuilderFactory) ⇒ DocumentBuilder
-
val
docBuilderFactory: DocumentBuilderFactory
-
val
domImplementation: DOMImplementationLS
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
-
def
print(doc: Document): String
-
def
print(doc: Document, encoding: String): Array[Byte]
-
final
def
print(elm: Elem): String
-
final
def
print(elm: Elem, encoding: String): Array[Byte]
-
val
serializerCreator: (DOMImplementationLS) ⇒ LSSerializer
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
withSerializerCreator(newSerializerCreator: (DOMImplementationLS) ⇒ LSSerializer): DocumentPrinterUsingDomLS
Inherited from AnyRef
Inherited from Any
DOM-LS-based
Document
printer.To pretty-print a
Document
, create aDocumentPrinterUsingDomLS
instance as follows:If more flexibility is needed in configuring the
DocumentPrinter
than offered by this class, consider writing a wrapperDocumentPrinter
which wraps aDocumentPrinterUsingDomLS
, but adapts theprint
method. This would make it possible to adapt the serialization, for example.A
DocumentPrinterUsingDomLS
instance can be re-used multiple times, from the same thread. If theDocumentBuilderFactory
andDOMImplementationLS
are thread-safe, it can even be re-used from multiple threads. Typically aDocumentBuilderFactory
orDOMImplementationLS
cannot be trusted to be thread-safe, however. In a web application, one (safe) way to deal with that is to use oneDocumentBuilderFactory
andDOMImplementationLS
instance per request.