This description might be out-of-date. See the module interface files for updated information.
class [ 'ext ] document : Markup_types.collect_warnings -> object method init_xml_version : string -> unit method init_xml_standalone : bool -> unit method init_dtd : dtd -> unit method init_root : 'ext node -> unit method xml_version : string method xml_standalone : bool method dtd : dtd method root : 'ext node method add_pinstr : proc_instruction -> unit method pinstr : string -> proc_instruction list end ;;The methods beginning with init_ are only for internal use of the parser.
xml_version: returns the version string at the beginning of the document. For example, "1.0" is returned if the document begins with <?xml version="1.0"?>.
xml_standalone: returns the boolean value of standalone declaration in the XML declaration. If the standalone attribute is missing, false is returned.
dtd: returns a reference to the global DTD object.
root: returns a reference to the root element.
pinstr: returns the processing instructions outside the DTD and outside the root element. The argument passed to the method names a target, and the method returns all instructions with this target. The target is the first word inside <? and ?>.
add_pinstr: adds another processing instruction. This method is used by the parser itself to enter the instructions returned by pinstr, but you can also enter additional instructions.