Serialization anchors are the main components you use in a Serializer. These are analogous to the anchors that are used in a Parser, except that they work in the opposite direction. Anchors read data from locations in the source document and write the data to XML. Serialization anchors read XML data and write the data to locations in the output document.
The most important serialization anchors are
ContentSerializer
and
StringSerializer
.
A
ContentSerializer
writes the content of a specified data holder to the output document. It is the inverse of a
Content
anchor, which reads content from a source document.
A
StringSerializer
writes a predefined string to the output. It is the inverse of a
Marker
anchor, which finds a predefined string in a source document.