Next / Previous / Contents / TCC Help System / NM Tech homepage

11. Printing a document

To write a DOM Document object to a file in XML form, first import a method like this:

import Ft.Xml.Domlette as domlette

There are two different serializing (printing) methods.

To serialize a document D:

Then pass the document object to it using this general form:

domlette.Print(D, stream, encoding )

where the optional arguments are:


A file object where you want the XML written. Defaults to standard output.


The character encoding you want to use. The default is 'UTF-8'.