Saxon.Api

Class DocumentBuilder

Class DomDestination

Class DynamicContext

Class DynamicError

Class EmptyEnumerator

Class ExtensionFunctionCall

Class ExtensionFunctionDefinition

Class NullDestination

Class ParameterDetails

Class Processor

Class QName

Class SchemaManager

Class SchemaValidator

Class Serializer

Class StandardLogger

Class StaticContext

Class StaticError

Class TextWriterDestination

Class TreeProtector

Class XPathCompiler

Class XPathExecutable

Class XPathSelector

Class XQueryCompiler

Class XQueryEvaluator

Class XQueryExecutable

Class XdmAnyFunctionType

Class XdmAnyItemType

Class XdmAnyNodeType

Class XdmAtomicType

Class XdmAtomicValue

Class XdmDestination

Class XdmEmptySequence

Class XdmFunctionItem

Class XdmItem

Class XdmItemType

Class XdmNode

Class XdmNodeKind

Class XdmSequenceType

Class XdmValue

Class XmlDestination

Class Xslt30Transformer

Class XsltCompiler

Class XsltExecutable

Class XsltPackage

Class XsltTransformer

Enum RecoveryPolicy

Enum SchemaValidationMode

Enum TreeModel

Enum WhitespacePolicy

Enum XdmAxis

Interface IMessageListener

Interface IQueryResolver

Interface IResultDocumentHandler

Interface IXdmEnumerator

Interface IXmlLocation

Interface SchemaResolver

 

Saxon.Api
Class Serializer


public class Serializer
extends XmlDestination

A Serializer takes a tree representation of XML and turns it into lexical XML markup.

Note that this is serialization in the sense of the W3C XSLT and XQuery specifications. Unlike the class System.Xml.Serialization.XmlSerializer, this object does not serialize arbitrary CLI objects.


Constructor Summary
Serializer()

Create a Serializer

 
Property Summary
static QName METHOD
static QName BYTE_ORDER_MARK
static QName CDATA_SECTION_ELEMENTS
static QName DOCTYPE_PUBLIC
static QName DOCTYPE_SYSTEM
static QName ENCODING
static QName ESCAPE_URI_ATTRIBUTES
static QName INCLUDE_CONTENT_TYPE
static QName INDENT
static QName MEDIA_TYPE
static QName NORMALIZATION_FORM
static QName OMIT_XML_DECLARATION
static QName STANDALONE
static QName SUPPRESS_INDENTATION
static QName UNDECLARE_PREFIXES
static QName USE_CHARACTER_MAPS
static QName VERSION
static QName SAXON_CHARACTER_REPRESENTATION
static QName SAXON_INDENT_SPACES
static QName SAXON_DOUBLE_SPACE
static QName SAXON_SUPPRESS_INDENTATION
static QName NEXT_IN_CHAIN
static QName SAXON_REQUIRE_WELL_FORMED
 
Method Summary
 void SetOutputProperty(QName name, string value)

Set a serialization property

 void SetDefaultOutputProperties()
 void SetCharacterMap()
 void SetOutputFile(string filename)

Specify the destination of the serialized output, in the form of a file name

 void SetOutputStream(System.IO.Stream stream)

Specify the destination of the serialized output, in the form of a Stream

 JOutputStream GetOutputDestination()
 void SetProcessor(Processor processor)

Set the Processor associated with this Serializer. This will be called automatically if the serializer is created using one of the Processor.NewSerializer() methods.

 void SetOutputWriter(System.IO.TextWriter textWriter)

Specify the destination of the serialized output, in the form of a TextWriter

 JReceiver GetReceiver()
 JProperties GetOutputProperties()

 void Close()

 
Constructor Detail

Serializer

public Serializer()

Create a Serializer


Property Detail

METHOD

public static readonly QName METHOD {}

BYTE_ORDER_MARK

public static readonly QName BYTE_ORDER_MARK {}

CDATA_SECTION_ELEMENTS

public static readonly QName CDATA_SECTION_ELEMENTS {}

DOCTYPE_PUBLIC

public static readonly QName DOCTYPE_PUBLIC {}

DOCTYPE_SYSTEM

public static readonly QName DOCTYPE_SYSTEM {}

ENCODING

public static readonly QName ENCODING {}

ESCAPE_URI_ATTRIBUTES

public static readonly QName ESCAPE_URI_ATTRIBUTES {}

INCLUDE_CONTENT_TYPE

public static readonly QName INCLUDE_CONTENT_TYPE {}

INDENT

public static readonly QName INDENT {}

MEDIA_TYPE

public static readonly QName MEDIA_TYPE {}

NORMALIZATION_FORM

public static readonly QName NORMALIZATION_FORM {}

OMIT_XML_DECLARATION

public static readonly QName OMIT_XML_DECLARATION {}

STANDALONE

public static readonly QName STANDALONE {}

SUPPRESS_INDENTATION

public static readonly QName SUPPRESS_INDENTATION {}

UNDECLARE_PREFIXES

public static readonly QName UNDECLARE_PREFIXES {}

USE_CHARACTER_MAPS

public static readonly QName USE_CHARACTER_MAPS {}

VERSION

public static readonly QName VERSION {}

SAXON_CHARACTER_REPRESENTATION

public static readonly QName SAXON_CHARACTER_REPRESENTATION {}

SAXON_INDENT_SPACES

public static readonly QName SAXON_INDENT_SPACES {}

SAXON_DOUBLE_SPACE

public static readonly QName SAXON_DOUBLE_SPACE {}

SAXON_SUPPRESS_INDENTATION

public static readonly QName SAXON_SUPPRESS_INDENTATION {}

NEXT_IN_CHAIN

public static readonly QName NEXT_IN_CHAIN {}

SAXON_REQUIRE_WELL_FORMED

public static readonly QName SAXON_REQUIRE_WELL_FORMED {}

Method Detail

SetOutputProperty

public void SetOutputProperty(QName name,
                         string value)

Set a serialization property

In the case of XSLT, properties set within the serializer override any properties set in xsl:output declarations in the stylesheet. Similarly, with XQuery, they override any properties set in the Query prolog using declare option saxon:output.

Parameters:
name -
The name of the serialization property to be set
value -
The value to be set for the serialization property. May be null to unset the property (that is, to set it back to the default value).

SetDefaultOutputProperties

public void SetDefaultOutputProperties()

SetCharacterMap

public void SetCharacterMap()

SetOutputFile

public void SetOutputFile(string filename)

Specify the destination of the serialized output, in the form of a file name

Parameters:
filename -
The name of the file to receive the serialized output

SetOutputStream

public void SetOutputStream(System.IO.Stream stream)

Specify the destination of the serialized output, in the form of a Stream

Saxon will not close the stream on completion; this is the caller's responsibility.

Parameters:
stream -
The stream to which the output will be written. This must be a stream that allows writing.

GetOutputDestination

public JOutputStream GetOutputDestination()

SetProcessor

public void SetProcessor(Processor processor)

Set the Processor associated with this Serializer. This will be called automatically if the serializer is created using one of the Processor.NewSerializer() methods.

Parameters:
processor -
processor the associated Processor

SetOutputWriter

public void SetOutputWriter(System.IO.TextWriter textWriter)

Specify the destination of the serialized output, in the form of a TextWriter

Note that when writing to a TextWriter, character encoding is the responsibility of the TextWriter, not the Serializer. This means that the encoding requested in the output properties is ignored; it also means that characters that cannot be represented in the target encoding will use whatever fallback representation the TextWriter defines, rather than being represented as XML character references.

Parameters:
textWriter -
The stream to which the output will be written. This must be a stream that allows writing. Saxon will not close the textWriter on completion; this is the caller's responsibility.

GetReceiver

public override JReceiver GetReceiver()

GetOutputProperties

public override JProperties GetOutputProperties()


Close

public override void Close()