Name
http_xmlelement_start, http_xmlelement_empty, http_xmlelement_end — streaming XML-element writers for the HTTP response body
Synopsis
http_xmlelement_start(
|
in name varchar, |
in attributes any); |
http_xmlelement_empty(
|
in name varchar, |
in attributes any); |
http_xmlelement_end(
|
in name varchar); |
Description
These BIFs write XML element markup directly to the current HTTP response
body, escaping attribute values and entity references as needed. They are
the streaming counterpart of the SQL/XML
xmlelement
constructor: instead of materialising a value tree they emit text
immediately.
http_xmlelement_start writes an opening
<name attr="val"...> tag. The optional
attributes argument is a vector of (name, value)
pairs.
http_xmlelement_empty writes a self-closing
<name attr="val"/> tag.
http_xmlelement_end writes a closing
</name> tag. The caller is responsible for
matching opens and ends; the BIFs do not check tag stacking.
Use these inside VSP/VSPX pages or HTTP handlers that produce large XML responses without buffering the whole tree in memory.