Saxon API for .NET

Serializer.SetOutputProperty Method 

Set a serialization property

public void SetOutputProperty(
   QName name,
   string value
);

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).

Remarks

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.

Example

                Serializer qout = new Serializer();
                qout.SetOutputProperty(Serializer.METHOD, "xml");
                qout.SetOutputProperty(Serializer.INDENT, "yes");
                qout.SetOutputProperty(Serializer.SAXON_INDENT_SPACES, "1");
              

See Also

Serializer Class | Saxon.Api Namespace