Class type Xmlstream.xml_stream_writer


class type xml_stream_writer = object  end
The XML stream writer. You give it elements, and then it lets you extract the serialized bytes to be written to the socket.

method data_bytes_avail : unit -> int
Returns how many bytes are available to be transmitted
method write_some : int -> (string -> int -> int -> int) -> int
The procedure argument is expected to accept str ofs len and return how many bytes were successfully written.
method write_fully : (string -> int -> int -> unit) -> unit
the procedure argument is expected to accept str ofs len. It should be prepared to be called multiple times.
method handshake : Yaxpodom.txt -> Yaxpodom.txt -> Yaxpodom.txt -> Yaxpodom.att list -> unit
handshake stream_ns_uri stream_ns_pfx default_ns_URI atts takes a stream (toplevel) namespace prefix and URI, default stream namespace URI, and list of attributes, and generates the stream start tag. The attributes MUST NOT contain the stream or default namespace declarations, but MAY contain additional declarations.
method add_ele : Yaxpodom.ele -> bool -> unit
Adds an element to the stream. The boolean argument specfies whether the stream writer should perform namespace processing on the element. If it is true, then the writer will walk the tree, determine which stream namespace prefixes are not declared inside the tree in the context of the rest of the stream, and add the appropriate declarations; this requires that all elements and attributes in the tree have the nsURI field of their qnames filled out. If the boolean argument is false, then the element will just be put into the stream verbatim. This can result in an invalid XML stream.
method end_stream : unit -> unit
generates the stream end.