[/code]
declare
doc xmldom.DOMDocument;
applNode xmldom.DOMNode;
subApplNode xmldom.DOMNode;
element xmldom.DOMElement;
result varchar2(4000);
begin
doc := xmldom.newDOMDocument();
element := xmldom.createElement(doc, 'Application');
applNode := xmldom.appendChild(xmldom.makeNode(doc),
xmldom.makeNode(element));
element := xmldom.createElement(doc, 'SubApplication');
applNode := xmldom.appendChild(applNode,
xmldom.makeNode(element));
xmldom.writeToBuffer(doc, result);
end;
[/code]
Now the length of
result is 93 bytes. Actually without any loss of information it may (and must!) be 87.
In my specific case (document is far more complex

) the difference is more than 100 bytes and I need them badly as the third party application requires that xml to be inserted into varchar2 field.
Regards, Dima