xml_tree_doc — returns an entity object given a tree from
in tree any ,
in base_uri varchar
This returns an entity object given a tree of the form returned
If it is given a string as an argument, it will automatically
generate the parse tree and use it to make the entity instead
requiring you to run the string through xml_tree first. Note that
it is better to use xtree_doc or
xper_doc for converting source XML text
directly to an XML entity.
If the argument is an XML tree entity, the function will return
it as is, so e.g. redundant calls of xml_tree_doc will have no effect. The only thing
xml_tree_doc can alter in the returned value is base URI of the
document entity: if base_uri is provided and is not NULL,
and argument entity has no base URI set then the provided URI is
assigned to the returned entity.
Any other type of argument is illegal, including XML persistent
either an XML tree such as that returned by xml_tree(), or a
string of XML data. If a string is provided then it will
automatically generate the parse tree and form an entity instead of
requiring you to run the string through xml_tree() first.
Base URI of the original document, if known. It will be useful
if the document is not "standalone" and some entity references are
relative references to resources located "somewhere near" the
"top-level" document passes as "tree" parameter.