Name
xml_tree_doc_encoding, xml_tree_doc_set_output, xml_tree_doc_set_ns_output, xtree_doc_get_dtd — read or update the serialization options stored on an XML tree entity
Synopsis
varchar xml_tree_doc_encoding(
|
inout entity XML, |
in new_encoding varchar); |
xml_tree_doc_set_output(
|
inout entity XML, |
in method varchar); |
xml_tree_doc_set_ns_output(
|
inout entity XML, |
in format integer); |
any xtree_doc_get_dtd(
|
in entity XML, |
in what integer); |
Description
xml_tree_doc_encoding with one argument returns the
encoding declared on entity (e.g.
'UTF-8', 'ISO8859-1'). With two
arguments it replaces that encoding, which affects how subsequent
serializations such as serialize_to_UTF8_xml or HTTP
responses encode the byte stream.
xml_tree_doc_set_output sets the output method
embedded in the entity. Recognised methods are 'xml',
'html', 'xhtml' and
'text'; the value is consulted by the XSLT engine and
by HTTP-response serialization paths.
xml_tree_doc_set_ns_output controls how namespace
declarations are emitted when the entity is serialized:
0 (default) emits canonical XML namespaces,
1 moves all xmlns: declarations to
the document root, and 2 suppresses them entirely
(intended for embedding in another document).
xtree_doc_get_dtd returns the DTD attached to
entity; what selects the
detail level: 0 returns the raw DTD tree,
1 returns the parsed element-declaration vector,
2 returns the entity-declaration vector.