4 >The objects representing the document</TITLE
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.46"><LINK
9 TITLE="The PXP user's guide"
10 HREF="index.html"><LINK
15 TITLE="Example: An HTML backend for the readme
17 HREF="x738.html"><LINK
19 TITLE="The class type node"
20 HREF="x939.html"><LINK
23 HREF="markup.css"></HEAD
42 >The PXP user's guide</TH
76 >Chapter 3. The objects representing the document</A
87 HREF="c893.html#AEN897"
112 >Details of the mapping from XML text to the tree representation</A
119 >This description might be out-of-date. See the module interface files
120 for updated information.</I
135 CLASS="PROGRAMLISTING"
136 >class [ 'ext ] document :
137 Pxp_types.collect_warnings ->
139 method init_xml_version : string -> unit
140 method init_root : 'ext node -> unit
142 method xml_version : string
143 method xml_standalone : bool
145 method root : 'ext node
147 method encoding : Pxp_types.rep_encoding
149 method add_pinstr : proc_instruction -> unit
150 method pinstr : string -> proc_instruction list
151 method pinstr_names : string list
153 method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit
159 The methods beginning with <TT
162 > are only for internal use
169 STYLE="list-style-type: disc"
174 >: returns the version string at the beginning of
175 the document. For example, "1.0" is returned if the document begins with
178 ><?xml version="1.0"?></TT
182 STYLE="list-style-type: disc"
187 >: returns the boolean value of
191 > declaration in the XML declaration. If the
195 > attribute is missing, <TT
202 STYLE="list-style-type: disc"
207 >: returns a reference to the global DTD object.</P
210 STYLE="list-style-type: disc"
215 >: returns a reference to the root element.</P
218 STYLE="list-style-type: disc"
223 >: returns the internal encoding of the
224 document. This means that all strings of which the document consists are
225 encoded in this character set.</P
228 STYLE="list-style-type: disc"
233 >: returns the processing instructions outside the DTD
234 and outside the root element. The argument passed to the method names a
238 >, and the method returns all instructions with this
239 target. The target is the first word inside <TT
249 STYLE="list-style-type: disc"
254 >: returns the names of the processing instructions</P
257 STYLE="list-style-type: disc"
262 >: adds another processing instruction. This method
263 is used by the parser itself to enter the instructions returned by
267 >, but you can also enter additional instructions.</P
270 STYLE="list-style-type: disc"
275 >: writes the document to the passed stream as XML
276 text using the passed (external) encoding. The generated text is always valid
277 XML and can be parsed by PXP; however, the text is badly formatted (this is not
278 a pretty printer).</P
323 >Example: An HTML backend for the <I