om.XmlWriter.createChannelWriter

Creates an om.SaxDocumentHandler object writing to a channel object.

Syntax

om.XmlWriter.createChannelWriter(
   channel base.Channel )
  RETURNING result om.SaxDocumentHandler
  1. channel is a base.Channel object reference.

Usage

The om.XmlWriter.createChannelWriter() class method creates an om.SaxDocumentHandler object that will write to the specified channel object, when using the om.SaxDocumentHandler methods.

The base.Channel object must exist and be open to receive data from the SAX document handler.

DEFINE w om.SaxDocumentHandler
DEFINE ch base.Channel
...
LET ch = base.Channel.create()
CALL ch.openFile("mydata.xml","w")
LET w = om.XmlWriter.createChannelWriter(ch)
...