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="x740.html"><LINK
19
TITLE="The class type node"
20
HREF="x941.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="c895.html#AEN899"
112
>Details of the mapping from XML text to the tree representation</A
124
>This description might be out-of-date. See the module interface files
125
for updated information.</I
140
CLASS="PROGRAMLISTING"
141
>class [ 'ext ] document :
142
Pxp_types.collect_warnings ->
144
method init_xml_version : string -> unit
145
method init_root : 'ext node -> unit
147
method xml_version : string
148
method xml_standalone : bool
150
method root : 'ext node
152
method encoding : Pxp_types.rep_encoding
154
method add_pinstr : proc_instruction -> unit
155
method pinstr : string -> proc_instruction list
156
method pinstr_names : string list
158
method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit
164
The methods beginning with <TT
167
> are only for internal use
174
STYLE="list-style-type: disc"
179
>: returns the version string at the beginning of
180
the document. For example, "1.0" is returned if the document begins with
183
><?xml version="1.0"?></TT
187
STYLE="list-style-type: disc"
192
>: returns the boolean value of
196
> declaration in the XML declaration. If the
200
> attribute is missing, <TT
207
STYLE="list-style-type: disc"
212
>: returns a reference to the global DTD object.</P
215
STYLE="list-style-type: disc"
220
>: returns a reference to the root element.</P
223
STYLE="list-style-type: disc"
228
>: returns the internal encoding of the
229
document. This means that all strings of which the document consists are
230
encoded in this character set.</P
233
STYLE="list-style-type: disc"
238
>: returns the processing instructions outside the DTD
239
and outside the root element. The argument passed to the method names a
243
>, and the method returns all instructions with this
244
target. The target is the first word inside <TT
254
STYLE="list-style-type: disc"
259
>: returns the names of the processing instructions</P
262
STYLE="list-style-type: disc"
267
>: adds another processing instruction. This method
268
is used by the parser itself to enter the instructions returned by
272
>, but you can also enter additional instructions.</P
275
STYLE="list-style-type: disc"
280
>: writes the document to the passed stream as XML
281
text using the passed (external) encoding. The generated text is always valid
282
XML and can be parsed by PXP; however, the text is badly formatted (this is not
283
a pretty printer).</P
328
>Example: An HTML backend for the <I
b'\\ No newline at end of file'