Class type Xmlstream.xml_stream_reader


class type xml_stream_reader = object  end
The XML stream "reader". The reader accepts arbitrarily chunked data received from the server. It then allows you to "pull" elements from it; elements are parsed as you pull them.

method add_data : string -> int -> int -> unit
Add a chunk of data to the reader. add_data s ofs len adds len bytes from s starting at ofs. The data is not actually parsed until you pull something.
method get_state : unit -> xml_stream_state
Returns the current state of the parser.
method pull_handshake : unit -> Yaxpodom.qname * Yaxpodom.att list
Pulls the XML Stream handshake, that is, the document start tag. Call this when data is first received from the server.
Raises Not_enough if not enough data is available. In this case, receive more data from the server, and try again.
method pull_ele : unit -> Yaxpodom.ele
Pulls the next content element from the XML stream.
Raises
The following methods are only meaningful after a successful pull_handshake:
method stream_ns_URI : unit -> string
Returns the toplevel namespace URI of the XML stream.
method stream_ns_pfx : unit -> string
Returns the prefix corresponding to the toplevel namespace URI. May be "" if the toplevel namespace URI is the default
method default_ns_URI : unit -> string
Returns the default namespace URI for the XML stream.
method stream_ns_decls : unit -> Yaxpodom.att list
Returns the stream's toplevel namespace declarations.