Class Serializer
- java.lang.Object
-
- org.smooks.engine.delivery.dom.serialize.Serializer
-
public class Serializer extends Object
Node serializer. This class uses theContentDeliveryConfig
and theSerializerVisitor
instances defined there on to perform the serialization.- Author:
- tfennelly
-
-
Constructor Summary
Constructors Constructor Description Serializer(Node node, ExecutionContext executionContext)
Public constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
recursiveDOMWrite(Element element, Writer writer)
Recursively write the DOM tree to the supplied writer.void
serialize(Writer writer)
Serialise the document to the supplied output writer instance.
-
-
-
Constructor Detail
-
Serializer
public Serializer(Node node, ExecutionContext executionContext)
Public constructor.- Parameters:
node
- Node to be serialized.executionContext
- Target device context.
-
-
Method Detail
-
serialize
public void serialize(Writer writer) throws IOException
Serialise the document to the supplied output writer instance. Adds the DOCTYPE decl if one defined in the Content Delivery Configuration. If the node is a Document (or DocumentFragment) node the whole node is serialised. Otherwise, only the node child elements are serialised i.e. the node itself is skipped.- Parameters:
writer
- Output writer.- Throws:
IOException
- Unable to write to output writer.
-
-