trait
Serializer extends AnyRef
Abstract Value Members
-
abstract
def
emptyElement(qName: QName, attributes: Traversable[Attribute], namespaces: Map[String, String], declareDefaultNS: Option[String], path: List[QName]): Option[Throwable]
-
abstract
def
endElement(qName: QName, path: List[QName]): Option[Throwable]
-
abstract
def
item(item: XmlItem, path: List[QName]): Option[Throwable]
-
abstract
def
startElement(qName: QName, attributes: Traversable[Attribute], namespaces: Map[String, String], declareDefaultNS: Option[String], path: List[QName]): Option[Throwable]
-
abstract
def
xmlDeclaration(encoding: Charset, version: XmlVersion): Option[Throwable]
Concrete 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
-
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
-
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
Inherited from AnyRef
Inherited from Any
Interface used for serializing the XML events, same for both stream and tree.
The default implementation validates the output via LSSerializer against a given encoding.
An alternative FastSerializer simply outputs strings and is in no way correct but at least faster then going to StreamWriter for incorrectness.
Serializers should use qName.ncName for serialization purposes of both attributes and elements, the QName is provided to allow for validation of ouput.
If a function returns Some it should signal the termination of the serializing. Implementations are expected to respect this approach, its for the benefit of all developers.
List[QName] is provided to help if path relevant information is needed for serialization. For example if a use case requires that a particular path is filtered out. Purely for performance reasons the list is in reverse order with the current QName at the top and root at the bottom.