1 XML Document Representation
class | ||||
| ||||
| ||||
class | ||||
| ||||
| ||||
annotation | ||||
|
The xml.Content annotation recognizes allowed content values:
xml.Text: Text, potentially written with <![CDATA[…]]> or &…;, depending on xml.Text.write_mode.
xml.Entity: Entities written with &…;. See xml.Entity form information about when xml.read produces xml.Entity objects.
xml.Inject: Text, possibly non-conforming, that is written verbatim by xml.write. The xml.read function never produces this form of content.
xml.Comment: A comment written with <!--…-->, produced by xml.read only when xml.current_read_comments is #true.
xml.ProcessingInstruction: A processing instruction written with <?…?>, produced by xml.read only when xml.current_read_processing_instructions is #true.
xml.OtherPermitted: Any other value, but only when xml.current_permissive is #true.
class | ||||
| ||||
| ||||
enumeration | ||||
|
The write_mode field is used by xml.write to select an encoding of the text:
#'default: Text is written using predefined entities as necessary to escape special characters, verbatim otherwise.
#'cdata: Text is written using <![CDATA[…]]>. A xml.Text object can be created with this mode only with text that does not contain a ]]>.
#'cdata: Text is written using an integer entity form &#…;. A xml.Text object can be created with this mode only with text that contains a single character.
Reading with normalization (see xml.current_read_normalize) produces this form only for symbolic entities, and reading always uses xml.Text instead for the predefined entities &, <, >, ', and ".
class | |||||
| |||||
class | |||||
| |||||
| |||||
annotation | |||||
|
xml.Comment represents comment written with <!--…-->. Comments are discarded by xml.read unless xml.current_read_comments is #true.
xml.ProcessingInstruction represents a processing instruction written with <?…?>. Comments are discarded by xml.read unless xml.current_read_processing_instructions is #true.
annotation | ||
| ||
| ||
context parameter | ||
|